Sign in to follow this  
pleska

Photo Flood Fill Plug-In

Recommended Posts

Hi all,

I just wrote another plug-in effect. This one allows you to take an image and "flood-fill" it into the selection region repeating it over and over. If you have a repeating texture or other image this fill will load that texture. Options are included to change the origin of the image both positive and negative in both the X and Y. Also, stealing code from my gradient fill plug-in you can restrict the fill to a single masking color within the selection area.

If you use non-rectanglular selections this effect should work fine with the understanding that the the entire selection is actually bounded in a rectangle surrounding it. The image fill will be based on this imaginary bounding rectangle.

Play with it and let me know if there are any issues or questions on using it.

As with most effect plug-ins, download the binary zip file, and put the single DLL inside the zip into the effects directory of Paint.Net and then relaunch the application. The new effect should appear on the effects menu.

Enjoy,

Paul

 

MODERATORS NOTE:  This effect is incompatible with Paint.NET 4.0x

I would recommend using BoltBait's Fill From File instead. It does the same thing, but better and works in paint.net v4.

Effect DLL (Binary)

http://www.sapphireonline.com/Downloads/PhotoFloodFillPlugIn.zip

Effect Source Code

http://www.sapphireonline.com/Downloads/PhotoFloodFillPlugInSource.zip

Share this post


Link to post
Share on other sites
The image fill will be based on this imaginary bounding rectangle.

You're still clipping to the selection area though, right?

Share this post


Link to post
Share on other sites
The image fill will be based on this imaginary bounding rectangle.

You're still clipping to the selection area though, right?

Yep,

I just use the rectanglular bounds of the selection region as a guide as to where to start the x and y repeating of the image. Although you only see the image in the selection area or the masked part of the selection area.

Paul

Share this post


Link to post
Share on other sites

Thanks so much for this, pleska!

I was desperately looking for a way to fill in pattern instead of colour, and this effect is exactly what I was looking for. Thanks for sharing it!

Greetings.

Share this post


Link to post
Share on other sites

Yeh..

Also....

GRsites.com I think it is, has a BUNCH of free textures for you to use, make a seperate folder I suggest in My Pictures, and Select that with the pattern you want....That is what I am doing.

Share this post


Link to post
Share on other sites

I have a request and I figured that this would be the best place to post it.

It would be nice to have the ability to set the blending mode of the image that is being imported. It would be similar to the Cloud effect that comes with PDN.

Share this post


Link to post
Share on other sites

Hello, crash report for ya. This was sent to me today.

This text file was created because Paint.NET crashed.
Please e-mail this file to paint.net@hotmail.com so we can diagnose and fix the problem.

Application version: Paint.NET v3.01 (Final Release build 3.01.2612.31539)
Time of crash: 19/03/2007 4:34:19 PM
Application uptime: 00:02:02.4062500
OS Version: 5.1.2600.131072 Service Pack 2 Workstation x86
.NET Framework version: 2.0.50727.42 x86
Processor: 2x "Intel(R) Pentium(R) 4 CPU 3.20GHz" @ ~3215MHz
Physical memory: 1023 MB
Tablet PC: no
Locale: pdnr.c: en-US, hklm: en-US, hkcu: n/a, cc: en-AU, cuic: en-US

Exception details:
System.IO.FileNotFoundException: pattern.png
  at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
  at System.Drawing.Image.FromFile(String filename)
  at PaintDotNet.Effects.PhotoFloodFillEffectConfigDialog.ResetLimits()
  at PaintDotNet.Effects.PhotoFloodFillEffectConfigDialog.InitDialogFromToken(EffectConfigToken effectTokenCopy)
  at PaintDotNet.Effects.EffectConfigDialog.InitDialogFromToken()
  at PaintDotNet.Effects.EffectConfigDialog.set_EffectToken(EffectConfigToken value)
  at PaintDotNet.Menus.EffectMenuBase.RunEffect(Type effectType)
  at PaintDotNet.Menus.EffectMenuBase.EffectMenuItem_Click(Object sender, EventArgs e)
  at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
  at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
  at PaintDotNet.PdnMenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
  at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
  at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
  at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  at System.Windows.Forms.ToolStrip.WndProc(Message& m)
  at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

Thank you very much Paul!

This is a very useful tool, in fact it is just what I was searching for, since I am using a very small pattern and it would have taken me hours to fill my picture!!

So I just registered on the forum to thank you :)

(Sorry if I made mistakes in my post, because I am french :wink: )

Share this post


Link to post
Share on other sites

Hi Pleska,

Feel embarrassed with everyone thanking you for the great plugin when I am totally lost despite trying to use it.

Any chance of a step-by-step tutorial with graphics?

Share this post


Link to post
Share on other sites

An idea to 'refresh' this plugin:

I've got an image with a transparent border (or not) like a single leave of tree.

I would like this plugin to fill randomly the selection with the image.

Randomly for the x,y position, and also with a random rotation +/- angle...

What do you think about it?

Share this post


Link to post
Share on other sites

Apparently, according to the profile, pleska last visited the forums on 'Mon 1 October, 2007 5:32:52 am' (UTC DST).

The source code is also on the first post along with the plugin download. Whether that is the latest version or not I don't know; this is the first time I've visited this topic. Ever. Of any use Fisherman's Friend?

Share this post


Link to post
Share on other sites
Apparently, according to the profile, pleska last visited the forums on 'Mon 1 October, 2007 5:32:52 am' (UTC DST).

Ooops :oops: I didn't know you can see it on the profile page... :oops:

The source code is also on the first post along with the plugin download.

Well, this I have checked before I wrote my post. :) Of course it is.

Of any use Fisherman's Friend?

Maybe my imagination takes me too far, but how do you actually mean that?

I) If you ask me if you comment was helpful: Your well-written post are always welcome, and I'm convinced this was a help not only for me.

II) If you ask what I want to say with "of any use": I just wanted to suggest to use the sourcecode. MadJik is one of the finest developers here, and I'm sure he could create the desired things supported by the (public) source code. (Again: I have no knowledge about coding and programming, therefore I don't know if it's a help.)

III) Or is the phrase not correct? :oops: :oops: :oops:

Sorry if this is true.

Share this post


Link to post
Share on other sites
II) If you ask what I want to say with "of any use": I just wanted to suggest to use the sourcecode. MadJik is one of the finest developers here, and I'm sure he could create the desired things supported by the (public) source code. (Again: I have no knowledge about coding and programming, therefore I don't know if it's a help.)

That one.

My fault, I thought you were asking for the source and not suggesting it to others. My misinterpretation, not yours :oops:. Sorry for any confusion caused.

Share this post


Link to post
Share on other sites
An idea to 'refresh' this plugin:

I've got an image with a transparent border (or not) like a single leave of tree.

I would like this plugin to fill randomly the selection with the image.

Randomly for the x,y position, and also with a random rotation +/- angle...

What do you think about it?

Wonderful are you doing this one? I could use it.

I don't like asking for changes to plugins as I can't recontribute with any coding. but this is one thing I would most likely use.

thanks in advance! hint hint

Share this post


Link to post
Share on other sites
Sorry for any confusion caused.

Same for me... :oops:

Next time I'll do my best to make my point clear. And now I'd be interested what for example MadJik thinks about it, or especially whether pleska allows to use the source for an "advanced version" or not. :roll:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this