What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

I want to paint on a PNG's alpha channel directly


Messages
11
Likes
0
This seems like it should be simple, but I can't figure it out.

I have a PNG with some transparency. Through the channels window, I can easily access the individual R G and B data, but I would like to directly paint on the Alpha channel. How can I do that?

There are areas of this image which are translucent, but I want to increase opacity.
 

ChrisHPZ

Power User
Messages
371
Likes
61
Well without the image you want to work on, it is difficult to answer your question. As much as I hate to assume anything, I'm going to assume that you're unsure of what alpha channels are and what they are used for. Ok, the alpha channel is something that you use to save and load selections. You don't really paint on it in the traditional sense of applying colors using the brush tool. You can however apply some of Photoshop's filters and adjustments to it though. Now depending on the amount of adjustments you want to make concerning opacity, you have a few options. Again, since we don't have your image to look at it's difficult to point you in the easiest direction to go. You can use the quick selection tool to select the areas you want to alter and load those selections into an alpha channel.

1. Make your selections
2. Click on the channels tab and click the Make New Channel icon at the bottom of the tab. It is next to the little trash can icon.
3. You'll see the new Alpha Channel layer appear.
4. Now make a new layer and then control + left click on the alpha channel in the channels tab to load the selections you made.
5. With your selections active, you can then use a brush of your choosing and paint each selection independently.

If you have to, drag the painted layer underneath the image layer and adjust the blending modes to suit. The Darken blend mode group does exactly what it says, it will darken your image. The lighten blend mode does the opposite. The overlay blend mode is used to increase contrast. Here's a link that talks about all the blend mode groups and is a must read. So I hope I've given you something to work with. I would continue but the arthritis is really bothering me. Post your picture and that will give us a better idea for a solution.

http://www.photoshopessentials.com/photo-editing/layer-blend-modes/
 
Messages
11
Likes
0
Thank you for your reply. I am sorry to say that I am already aware of the ability to add an opacity layer in the channels window. The problem with this is that the most it can do is reduce the opacity of my PNG. It is incapable of restoring alpha from a lower to a higher value.

For example, if I load an ARGB image, and I sample a half-transparent white pixel, it might read (127,255,255,255). The alpha value would be 127 in this case. what I need is the ability to paint onto the alpha channel so that I can change the value of this pixel to be (255, 255, 255,255). Here, the alpha would be 255; fully opaque.

With your method, this is not possible because it can merely subtract from the existing alpha, it cannot add to it.

Thank you for your explanation anyway.
 
Last edited:

ChrisHPZ

Power User
Messages
371
Likes
61
Well actually, and 50% transparent white pixel would come up as 255,255,255,0.5 in RGBA. In RGBA, opacity is last and is determined by values between 0 and 1. Just a little tidbit there.
 
Messages
11
Likes
0
Well actually, and 50% transparent white pixel would come up as 255,255,255,0.5 in RGBA. In RGBA, opacity is last and is determined by values between 0 and 1. Just a little tidbit there.
Well actually actually, I'm working in C# (Via Unity3D) and when referencing colour data, all of the channels are a float with a 0-1 range, so none of this is accurate. Hehe. Also, I am in fact working with files that are ARGB, not RGBA.

But we're getting off track. Thank you all for your input!

EDIT: a solution to my original problem I'm settling on is simply duplicating my layer repeatedly, collapsing it down and then applying an opacity mask to that. It's ham-handed and inelegant, but it works.
 
Last edited:

ChrisHPZ

Power User
Messages
371
Likes
61
I have a membership with Lynda.com and I've been following some of the courses on ASP and C#. Unfortunately, the lessons use ASP 2.0 I can't seem to get past the many errors that Visual Studio throws at me concerning IIS and application pools and whatever else. It's been more than frustrating on many occasions. I don't really have to know this side of web design as I've been using HTML and CSS just fine. But since my school offered VS 2012 Professional edition to its students, I want to get into it.
 

Top