Jump to content
How to Install Plugins ×

Blur Fill v1.5.1 (Jan 16, 2018)


Recommended Posts

Blur Fill

 

Effects -> Fill -> Blur Fill

ui.png

Before (image surrounded by transparency):

blurfill-before.png

After:

blurfill-after.png

 

Features

  • Fill the transparent area of the canvas with a scaled (fixed ratio) copy of the trimmed image.

 

Notes

Regarding the 'Position Adjust' sliders: The background is scaled at a fixed ratio to fill the canvas, thus only one dimension will be clipped and that dimension's slider is the only one that will have an affect. If the ratio of the canvas and the ratio of the trimmed image are exactly the same, no clipping will happen and thus neither slider will have an affect.

 

Changelog

v1.5.1 (Jan 16, 2018)

  • Fixed: The effect properly disposes of it's extra surfaces now.

v1.5 (Jan 13, 2018)

  • Added: Russian translation by @ReMake is now included.
  • Changed: Uses less memory now.

v1.4.1 (Jan 17, 2017)

  • Fixed: In some cases, the effect would crash with a Read AccessViolationException.

v1.4 (Dec 31, 2016)

  • Fixed: The bottom pixels and the right pixel were getting clipped.
  • Changed: The panning control now uses 3 decimal places, instead of 2.

v1.3 (Jan 12, 2016)

  • New: You can now run the effect on a selection.
  • New: Added an icon to the plugin

v1.2 (Nov 7, 2015)

  • Fixed: Effect would crash if run on an absolutely transparent canvas.

v1.1 (Oct 3, 2015)

  • New: Added a checkbox to make keeping the original image optional
  • Changed: Moved some code into OnSetRenderInfo. Makes the effect faster and use less memory, as it no longer runs the same code over and over again

v1.0 (Aug 25, 2015)

  • Initial release

 

Download

:RightArrowBlue:  BlurFill.zip

 

 

Example - 16:9 Movie Banner

alamo.png

 

Source Code

Source files and Git history

 

Icon based on icons from Fugue Icons.

Edited by toe_head2001
fixed broken images
  • Upvote 9

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Very cool!  I like this idea.  :star: :star: :star: :star:

Link to comment
Share on other sites

Very nice! You could add some variations like zoom blur, pixelate, distortions, ...  :)

 

Yes, if people want them, I don't see why not. Would I have to change the plugin name?

 

I would not allow more than one at a time though. (e.g. Pixel + Gaussian blur + ect.) That would just make the code too complex, and probably a lot slower.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

I like the name Blur Fill. Accurate and elegant. Why change it because you're adding options?

Link to comment
Share on other sites

Very nice soft result with this Plugin :) .  I added a bit of posterize as well.

 

Blur%20Fill%202_zpsdirxj8h0.png

 

That kitty looks so sad in your sig that I want to adopt it :D .

 

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

  • 1 month later...

Version v1.1 posted, and it's a whole a lot faster. My largest test image went from 48 seconds to 2.5 seconds. Of course your results will vary, as it depends on the dimensions of the canvas and the amount of transparency you have around your image... not to mention your hardware.

 

Don't like Blur? Duplicate your layer, and then run the plugin on your bottom copy without "Keep original image" and Blur set to 0. You are then free to run whatever effect you want on it. Pixelate, polar inversion, ect.

 

Example:

starry-night.png

 

Pixelate on bottom layer.

Drop Shadow on the top layer.

  • Upvote 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 2 weeks later...

If you accidentally apply 'Blur Fill' for the absolutely transparent image, then you will get an error message.

 

BF_err.png

 

The full text of messages:

Hidden Content:

File: C:\Program Files\paint.net\Effects\BlurFill.dll
Name: BlurFillEffect.BlurFill
Version: 1.1.0.0
Author: Copyright © 2015 toe_head2001
Copyright:
Website: http://www.getpaint.net/redirect/plugins.html
Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
at PaintDotNet.Surface.CopyFromBitmap(Bitmap bitmap, Boolean detectDishonestAlpha) in d:\src\pdn\paintdotnet\src\Core\Surface.cs:line 877
at BlurFillEffect.BlurFill.OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs)
at PaintDotNet.Effects.Effect`1.OnSetRenderInfo(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs) in d:\src\pdn\paintdotnet\src\Effects\Effect`1.cs:line 67
at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in d:\src\pdn\paintdotnet\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 220
--- End of inner exception stack trace ---
at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in d:\src\pdn\paintdotnet\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 431
at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in d:\src\pdn\paintdotnet\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 387
at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in d:\src\pdn\paintdotnet\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 333
at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass31.<>c__DisplayClass35.<RunEffectImpl>b__25() in d:\src\pdn\paintdotnet\src\PaintDotNet\Menus\EffectMenuBase.cs:line 1003

 

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...

If you accidentally apply 'Blur Fill' for the absolutely transparent image, then you will get an error message.

 

Version v1.2 posted. It will now check if the Trimmed Bitmap is null, and no longer crash. Sorry it took me so long to push out this update... kind of forgot about your post until this evening...

  • Upvote 2

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 2 months later...

Version 1.3 posted.

Now that I've figured out how to run Gaussian Blur on a selection without transparency bleeding in, I've enable this effect to run on selections.

  • Upvote 2

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Version 1.4 posted.

Fixes an off-by-one bug where the bottom pixels and the right pixels were being clipped. Panning should also have a bit more precision; I switched from using int types to float types in a few places, and the pan control now has 3 decimal places.

  • Upvote 4

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 3 weeks later...

Toe_head2001,

 

I have got a crash. I selected the entire canvas and reduced the size and reduced my image as in the screen shot. I forgot to deselect it and paint.net crashed when I launched the effect. What is weird is that if the image is larger as in the second image, Paint.net does not crash.  

 

If I deselect the image, the effect launches and renders but the position adjustment does not work as in the third image.

Spoiler

blurfill-error-51634d1.png

 

blurfill-error-02-5163515.png

 

blurfill-error-03-5163567.png

 

File: C:\Program Files\Paint.NET\Effects\BlurFill.dll

      Name: BlurFillEffect.BlurFill

      Version: 1.3.0.0

      Author: Copyright © 2015 toe_head2001

      Copyright:

      Website: http://www.getpaint.net/redirect/plugins.html

      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

   at System.Runtime.InteropServices.Marshal.CopyToManaged(IntPtr source, Object destination, Int32 startIndex, Int32 length)

   at BlurFillEffect.BlurFill.TrimBitmap(Bitmap source, Double ratio, Double offsetX, Double offsetY)

   at BlurFillEffect.BlurFill.OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs)

   at PaintDotNet.Effects.Effect`1.OnSetRenderInfo(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs) in D:\src\pdn\src\Effects\Effect`1.cs:line 65

   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 224

   --- End of inner exception stack trace ---

   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 418

   at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 373

   at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 319

   at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass42_5.<RunEffectImpl>b__4() in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 1003

 

Link to comment
Share on other sites

@Eli, that's a very peculiar crash, as the Selection should not have any bearing on that specific section of code.

I've fixed (more of a work-around) the issue though. I sent you a test build, and if it works well for you, I'll officially release it this evening.

 

 

22 hours ago, Eli said:

... but the position adjustment does not work as in the third image.

The ratio of the Canvas and the ratio of the Image are the same; thus it's a perfect fit and there's nothing to adjust.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

1 hour ago, toe_head2001 said:

I've fixed (more of a work-around) the issue though. I sent you a test build, and if it works well for you, I'll officially release it this evening.

It does not crash anymore.Though I tried hard. :) 

 

1 hour ago, toe_head2001 said:

The ratio of the Canvas and the ratio of the Image are the same; thus it's a perfect fit and there's nothing to adjust.

I should have thought of that. :mrred:

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...