Sign in to follow this  
Followers 0
Illnab1024

Alpha Mask Import Plugin (2.0)

115 posts in this topic

Alpha Mask -- 2.0

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:

Hidden Content:
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: AlphaMask.zip

Source: AlphaMaskImport_SRC.zip

3

Share this post


Link to post
Share on other sites

Works fine here...Try it again...Maybe its overseas connection problems...

0

Share this post


Link to post
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?)

0

Share this post


Link to post
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:

1

Share this post


Link to post
Share on other sites

Lol. You're my hero too because I was too lazy to respond. But, over half the code is from pleska, so thank him too (mainly because I was too lazy to make it myself, and available resources are the easiest way.)

Bug reports are appreciated, too.

0

Share this post


Link to post
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

0

Share this post


Link to post
Share on other sites

Nah...I think this something that can be handled in the plugin. Give me a minute and I will release an update (also with the ability to invert your mask in case you screwed up)...

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
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...

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

The mask should be the same size as the image it is gonna be applied over for it not to be tiled

0

Share this post


Link to post
Share on other sites

:oops: Yeah, you're right. I had obviously resized a couple of pics for some reason and forgot about it.

I retested the mask last night and it fit just fine.

Sorry for the trouble and thanks again.

0

Share this post


Link to post
Share on other sites

After reading all the comments, I feel like I'm missing something good here; also feel rather sheepish in not knowing what I'm missing!

Could someone kindly do a simple short tutorial?

Thanks!

0

Share this post


Link to post
Share on other sites

"Isn't short" is correct!

But the effect works beautifully. Will have to try your steps and the alpha mask effect out to discover more.

Thanks for the response.

0

Share this post


Link to post
Share on other sites

Greatest Plugin I ever used!

Alpha handling is the most important thing to me. Could you anyway make a layer blend mode as alpha mask but only to affect the layer right under it? That would be really great.

0

Share this post


Link to post
Share on other sites

I'm not sure where the official DLL went, but for now, here's a temporary solution:

URL Removed

Sorry Illnab. You may sue me if you wish. :wink:

Edit:

Temporary solution no longer needed

0

Share this post


Link to post
Share on other sites

I'm not sure where the official DLL went, but for now, here's a temporary solution:

URL Removed

Sorry Illnab. You may sue me if you wish. :wink:

Edit:

Temporary solution no longer needed

0

Share this post


Link to post
Share on other sites

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

0

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  
Followers 0