Jump to content

Tanel

Members
  • Posts

    205
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Tanel

  1. Yes, if you alpha-blur an object placed on empty background then only 'Shift in' is meaningful.

    Other settings are useful when some color exists in transparent areas.

    Color information in transparent areas can be preserved by using eraser tool, Curves+ or 'Color to Alpha' plug-in.

  2. Download as part of my plugin pack.

     

    Updated version of my original plug-in.

    Performance (speed) is greatly improved - now using my own blur algorithm instead of built-in one.

    Added "Shift" control allows to move around the blur area, giving more flexibility over result.

    alphablur2sample.png

    Comments, questions, suggestions welcome here.

    • Upvote 4
  3. Render rect's coordinates don't always match those of canvas.

    Thererefore y loop starting at y = rect.Top + 1 will cause unpredictable results.

    You could work around though, by using coordinates from Rectangle selection :

    for (int y = selection.Top + 1; y < selection.Bottom - 1; y++)

    Someone will sure present a better solution. :roll:

  4. I have redesigned those effects to use my own* fastblur code instead of calling PdN's gaussian blur.

    Benefit is faster, radius independent performance. For better user experience, blur is rendered only when changing radius, otherwise the blurred copy is held intact on tempsurface.

    I am eager to find out how it works on different systems. So please try those out and give some feedback. :)

    Download: tanel_plugintest_20101205.zip

    * The blur code is actually implemented from http://free.pages.at/easyfilter/gauss.html (gauss2.ffp).

    Thanks to Alois Zingl for this impressive study and permission to use it.

  5. I suspect that the crashes are caused by some combination of system config and/or version of .NET framework and/or Paint.net itself.

    The plugin just uses PdN's native gaussian blur and makes some math. No direct memory handling or anything cyptic.

    It could be useful to see more system spec and details about plugin setting that triggered the crash.

    Anyway I haven't succeeded to crash it myself on any machine with XP, .NET framework 3.5 SP1 and Pdn 3.5.5.

  6. This effect generates "film grain" (or luminance grain).

    Use it to add some character to otherwise boring-smooth digital image. ;)

    Especially suitable for black and white photos.

    Find it as Effects > Noise > Grain

    Download as part of my plugin pack.

    Controls

    Amount – amount of grain.

    Balance – grain distribution across image brightness. "Shadows" applies more grain to dark parts, "Highlights" applies to bright parts.

    Tech stuff: basically it uses built-in noise effect at zero saturation, but allows additional balancing of noise level between shadows and highlights.

  7. Can you spot why is this code several times slower in v3.5.5 (and 3.5.4) than v3.36? Is there some version specific optimizations I should implement?

    I measured speed difference 3...5 times on different size images (My system is XP SP3, Core2Duo, 3.5 GB).

    Below effect is actually stripped down to just call AddNoiseEffect and render the result.

    In v3.36 it renders fast.

    In v.3.5.5 (and 3.5.4) it is slow.

    Codelab designed effect:

    #region UICode
    int Amount1 = 50; // [0,100] Amount
    #endregion
    
    unsafe void Render(Surface dst, Surface src, Rectangle rect)
    {
       // Setup for calling the Noise function
       AddNoiseEffect noiseEffect = new AddNoiseEffect();
       PropertyCollection nProps = noiseEffect.CreatePropertyCollection();
       PropertyBasedEffectConfigToken nParameters = new PropertyBasedEffectConfigToken(nProps);
       nParameters.SetPropertyValue(AddNoiseEffect.PropertyNames.Intensity, 40);
       nParameters.SetPropertyValue(AddNoiseEffect.PropertyNames.Saturation, 0);
       nParameters.SetPropertyValue(AddNoiseEffect.PropertyNames.Coverage, 100.0);    
       noiseEffect.SetRenderInfo(nParameters, new RenderArgs(dst), new RenderArgs(src));
       // Call the Noise function
       noiseEffect.Render(new Rectangle[1] {rect},0,1);
    
       // Now in the main render loop, the dst canvas has a noisy version of the src canvas
       for (int y = rect.Top; y < rect.Bottom; y++)
       {
           ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y);
           ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y);
           for (int x = rect.Left; x < rect.Right; x++)
           {
               ColorBgra DstPixel = *dstPtr;
               ColorBgra SourcePixel = *srcPtr;
    
               // will render some more stuff here
    
               *dstPtr = DstPixel;
    
    
               srcPtr++;
               dstPtr++;
           }
       }
    }

  8. This plugin removes animal eyeshine from photos caused by direct flash.

    Download here

    Eyeshine.zip

    Recommended workflow:

    1) Use color picker :ColorPicker: to spot the color to be fixed.

    2) Make a circle selection :EllipseSelectTool: around eye pupil (a little larger than pupil size). Work only with one eye at a time, as there is usually color variations between them and it is harder to find proper settings for both eyes together.

    3) Start the „Eyeshine Removal“ plugin from Effects > Photo.

    4) Drag the color wheel controls until the shiny eye pupil is precisely covered with black/gray. Then drag around the Black Level, White Level and Smoothing controls to adjust black/white balance of the result.

    Here are few examples:

    eyeshine_sample.jpg

    I’m intrerested in your feedback, especially how it works in full size photos (I didn’t have many full resolution photos to try out myself).

  9. May I suggest moving Polygonal Transparency to the "Object" submenu?

    i6zed2.png

    I honestly see no use for a new submenu if it includes only one entry. The meaning of submenus should be to produce a clean user interface and to avoid an overcrowded one. We do not know if this submenu is "accepted" like Object, Tools and Color. Considering that general transparency effects rather go in "Adjustments" I see the possibility that half a year in the future this submenu will still feature only one single entry. Now that I mentioned this, I also think a "Transpareny" submenu may confuse the users.

    This not bad really. I would like to see all the plugins named something_Alpha_something together there.

×
×
  • Create New...