Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Enormator

  1. triangulargradient.png

    Makes a triangular gradient in selection (or on the full image when nothing is selected) from primary to secondary color (including alpha).

    Here is the (quite simple) CodeLab source:

    #region UICode
    int Amount1=0;	//[0,100]Slider 1 Description
    int Amount2=0;	//[0,100]Slider 2 Description
    int Amount3=0;	//[0,100]Slider 3 Description
    void Render(Surface dst, Surface src, Rectangle rect)
        // Delete any of these lines you don't need
        Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
        long CenterX = (long)(((selection.Right - selection.Left) / 2)+selection.Left);
        long CenterY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top);
        ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
        ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
        int BrushWidth = (int)EnvironmentParameters.BrushWidth;
        double m,topborder;
        int locx,locy;
        ColorBgra CurrentPixel;
        for (int y = rect.Top; y < rect.Bottom; y++)
            locy = y-selection.Top;
            for (int x = rect.Left; x < rect.Right; x++)
                CurrentPixel = src[x,y];
                locx = x-selection.Left;
                m = (((double)selection.Bottom-selection.Top)/(selection.Right-selection.Left));
                topborder = m*locx;
                CurrentPixel.R = (byte)((PrimaryColor.R*locy+SecondaryColor.R*(topborder-locy))/topborder);
                CurrentPixel.G = (byte)((PrimaryColor.G*locy+SecondaryColor.G*(topborder-locy))/topborder);
                CurrentPixel.B = (byte)((PrimaryColor.B*locy+SecondaryColor.B*(topborder-locy))/topborder);
                CurrentPixel.A = (byte)((locy<=topborder ? ((PrimaryColor.A*locy+SecondaryColor.A*(topborder-locy))/topborder) : 0));
                dst[x,y] = CurrentPixel;



    I did this because I needed it but you still may tell me what you think about it.

    I use PdN 3.36 and have no clue what the recent version of PdN will say about that dll. If it doesn't work, just use codelab (if that still exists, don't know, was not here for quite a while)




  2. I remember there was an average blur plugin lying about that gave the average color of your canvas. Maybe it can help?

    [Edit] There, in KrisVDM's pack:


    I already got helped with it in the Plugin Developer Central but I'm in the mid of my degree tests right now, so probably there won't be anything done until next week.

    Duuude, this looks sweet - I've been wanting something that could do this! I'll download it after a week or so has passed and you've had time to fix any bug reports that come in. 8)


    I think at the moment this plugin is just too simple to have serious bugs. It's made with codelab and not very complicated.

    Thank you all for the feedback :)

  3. I think many Mozilla developers like Linux. So they would definitely make a Linux Distro as an OS. This means, that PdN will not run, which leads to you all still having a Windows partition.

    Furthermore, I don't think it very likely, that Mozilla will make an OS because they're just big enough to make the best browser, compatible to all OSes, but making an OS would be a too great effort for them, I think, and besides it would then only be yet another Linux distro.

    Google... I like Google because they do so many things for us Users, but I don't trust them enough to use a closed source OS from them. I also use Microsoft OSes only for uncritical applications. I would never do stuff like Online Banking on a closed-source-OS. Google knows quite enough about me because I use their mail (because it is far the best out there). For searching I use Ixquick. They got the European Privacy Seal because they don't store any information from you, not even your IP address.

    Anyone knows another good EMailprovider? (free, lots of space, no too distracting ads)

  4. What are the edges of the entire image? "rect" is only a small part of the image, isn't it?
    You can get all the rects of the selection via

    Rectangle[] selectionScans = this.EnvironmentParameters.GetSelection(src.Bounds).GetRegionScansInt();

    To access every selected pixel I would then have to write a triple loop like this?

    for (int i = 0; i < selectionScans.size(); i++)
       for (int y = selectionScans[i].Top; y < selectionScans[i].Bottom; y++)
           for (int x = selectionScans[i].Left; x < selectionScans[i].Right; x++)
               //add this pixel to the arithmetic mean calculation

    and to access ie the red value of a pixel would I then use this?


  5. process the entire image

    What are the edges of the entire image? "rect" is only a small part of the image, isn't it?

    Couldn't it happen, that the second rendering thread tries to read the color before it the first is ready with calculating it? I could set a flag for being ready, but how do I wait for the flag? Like this?


  6. You are not misunderstanding anything as it seems. I'm working on it :)


    This seems to be more difficult than I thought (maybe even impossible) due to the multithreaded rendering architecture of PdN. Would it also be a good thing to have a color wheel where you can select a color and see how it looks like?


    color wheel added in v1.1

  7. Adjustments -> invertaroundprimcol377a1.png invert around primary color

    version 1.1

    You know "invert colors"? This plugin is quite similar except that you can invert colors around other colors. Look at the examples to understand.

    If you want to make this picture look stamped-in instead of stamped-out, you can just use the normal invert colors effect

    ex017fc96.png __ :InvertColors: invert colors__> ex02a6e43.png

    But on this picture, it would be impossible to do that because it would look like this:

    ex117f4cd.png __ :InvertColors: invert colors__> ex123b7e7.png

    Now this plugin comes in handy. You take the color picker :ColorPicker: and select the middle color (like in the background of the picture) as primary color. The you use Adjustments->invertaroundprimcol377a1.pnginvert around primary color

    ex117f4cd.png __invertaroundprimcol377a1.pnginvert around primary color__> ex13fc2ee.png

    Another example: A middle orange has been selected as primary color. Note how every bump is inverted.

    ex21bb213.png __invertaroundprimcol377a1.pnginvert around primary color__> ex2314c7b.png

    With normal color inversion :InvertColors: the outcome would be like this: ex221f50a.png

    :idea: A usage tip: If you don't know the middle color of your image, just resize it to 1x1 px and then colorpick the only pixel left. Undo the resize and then you can easily use my effect.

    Let me see, what you use it for! I'm looking forward to other creative using ideas for this plugin :mrgreen:



    added color wheel


  8. realistic spaceships

    I'm afraid you don't understand the sig, it is about imagination. Everyone can see a perfectly drawn rocket and say "ah it's a rocket".

    Your space ship although looks very good^^

    Your sig also looks good. It deserves maybe more than this but I give it an 8.5/10 because it's not in a style I like.

    The next poster should also rate king's for that reason.

    EDIT: @Juraiko1324: Is that intentionally? In your sig there are 2 lines of transparent in the lower left corner. This is your alpha mask (black means transparent, white means opaque). If not you should probably fix that ;)


  • Create New...