Jump to content
How to Install Plugins ×

Alpha Mask Import Plugin (2.0)


Recommended Posts

MODERATORS NOTE:  This effect may have issues with newer versions of Paint.NET.

An alternative plugin, called Apply Alpha Mask, is available here:






Alpha Mask -- 2.0


:FileSave: AlphaMask.zip



Version 2.0 adds the ability to use whatever image is on your clipboard.

The supported image types at the moment is kinda sketchy, but the kicker is it works for stuff copied inside Paint.NET, which is 99% of this plugin's use, anyway.

This plugin allows you to import an image from a file or the clipboard and make it an alpha mask. If the image has color, it will be converted to greyscale.

Clipboard idea courtesy BoltBait. <3

Source Download, 2 years later


Old description / links:


Okay. Here is a temporary solution until the real thing arrives. This allows you to import an image from a file and make it an alpha mask. If the image has color, it will be converted to greyscale. The file import is based from pleska's Photo Flood Fill Plugin.

Tell me if the link breaks.

Please do not criticize the fact that you have to save an image; the Effects API cannot handle layer information. Thus, this is the easiest way.

I hope you all enjoy this.

EDIT: Released v1.1. I couldn't find a time to handle the OoM exception before PdN saw it. I will look more into it. Sorry for the wait, it has been a busy week.

EDIT2: Release v1.2: Option to mix alpha added.

Old 1.2 Links. Look at top for current DLL.

Plugin DL: <snip>

Source: AlphaMaskImport_SRC.zip


Edited by toe_head2001
updated link in compatibility note
  • Upvote 3


Link to comment
Share on other sites

Seriously, I can't see any use of this at all, I don't even KNOW what it does, I thought we could be able to pick a color, but to pick a FILE (WTH?)

Actually, this sounds like teh roxx! (Alright, enough with the stupid speek...)

See trickman, if you were only able to pick a color, then the whole layer would be partly transparent, same as adjusting the layer's opacity slider. This allows you to create a mask, an image whose intensity values change the opacity of a layer in your image.

So, if you wanted to make a shape with the curve tool and fill it with a gradient, but you didn't want the rough edges you get with the Magic Wand alternative, you could create the shape in a new image in white with a background of black, and save it as a .png. Then make your gradient in a new image, and use this plug-in to import the mask you just saved. The gradient would show in the white area, the shape you created in the original image, and the rest would be transparent!

I'm not on my laptop (and I'm on a dial-up connection (Boo! (Ooh! Parentheses inside of parentheses!))), but I'll certainly be picking this up! Thank you Illnab! You get to be my new hero! :wink:

  • Upvote 1

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Alright then, thanks pleska too! :D

Anyway, I grabbed this yesterday, and it works like a charm! I thank you from the bottom of my wittle heart! Until PDN gets bona fide layer masks, this is a wholly acceptable substitute.

I was able to make it crash, though. It was partly my fault, but I figure I should let you know. I'm really not sure this is a problem with your plugin, since the same thing happens with the Photo Flood Fill plugin, but rather an unhandled exception with PDN...

I made my image, then typed gravitymask1.png in the name box but forgot to change the file type drop-down from PDN, so it was in effect a corrupt PNG. Before I realized my mistake, I tried loading it in the alpha mask importer, and PDN threw a System.OutOfMemory exception.

Again, I don't really know if there's anything that can be done within the Effects API to catch this, so I'll be posting this on Bugs - Troubleshooting as well.

Regardless, my high praise still stands. Thank you much! :D

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

  • 2 months later...

I finally downloaded the alphamask the other day and I don't know how I ever got along without it. The mask and the feather plugin are my two favorite plugins.

I have one question about the mask though. What's the "mask file" feature used for?

I've been saving my used masks into a folder I named "mask," and I had assumed that the mask file would be used for pulling up those previously used masks.

I was going to reuse an old mask for a second time when I finally used the mask file yesterday. What I got was this strange tiled thing with four smaller copies of the original cutout area. What's up with that?

Exactly how is the mask file meant to be used? Thanks in advance.

Link to comment
Share on other sites

Well, if the mask file image is smaller in resolution than the image it is applied to, it is meant to tile over the image...

Hmm...to your first question - that is the label input for the File you import for the alpha mask

And the mask file should be [Doesn't have to be - it is converted to greyscale when loaded] a grayscale image where a pixel's intensity decides the alpha of the corresponding image in the selection...


Link to comment
Share on other sites

Thanks for responding so quickly Illnab1024.

Let me just tell you what I'm trying to do.

I want to reuse an old mask on the same picture so that I don't have to apply the mask again from scratch.

I've tried every conceivable way to get a saved mask to fit over the original picture, but I always get the tiled mask with several smaller images on it. Those images also don't contain the color I used for the mask.

Anyway, I've tried using the mask file to pull up an old mask, and then pulling up the original picture on a second layer.

That doesn't work. I've also tried to do it visa versa with no luck either.

Maybe I'm not saving the mask correctly. When I save a mask, I first cut out the background. I'm then left with an image of the masked area alone. I simply highlight the layer with the used mask and save it to a folder I have set aside for that purpose.

Perhaps none of this is possible and you just have to mask from scratch every time.

Thanks again.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 month later...

Once you learn how to use it, it will become the gateway to new skills, techniques, and possibilities. It's one of the greatest plugins ever (or should I say the greatest?).

"The greatest thing about the Internet is that you can write anything you want and give it a false source." ~Ezra Pound

twtr | dA | tmblr | yt | fb

Link to comment
Share on other sites

  • 1 month later...
Has nothing to do with that Steganography topic in the General Coding forum has it? If not, could you enlighten us with a small taster for what is to come?

It has EVERYTHING to do with it. ;)

I found the source code to pleska's Photo Flood Fill plugin. I'll just use that.

Link to comment
Share on other sites

  • 3 months later...
Still waiting for a tut explaining how to use it well, though... ;)

Here's a really good tutorial on how to use it, it helped me out TONS.


The_Lionhearted's post is dated May 31, 2007.

If you look at the PdN forum post for that Tutorial, you'd see that T_Lh has since posted there extolling the virtues of said Tutorial...

Yeah, we were all very aware when CMD finished that Tutorial.


Take responsibility for your own intelligence. 😉 -Rick Brewster

Link to comment
Share on other sites

Join the conversation

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

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...