Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a gray-scale image. I need to convert gray-scale tones to transparency data in alpha channel using Adobe Photoshop. Say if the area is black, then no transparency. The white areas will be converted to full transparent pixels in alpha channel.

How to do it?

Update:

This is sample file, which I made by Fireworks. This sample is a result which I would like to achieve in Photoshop.

Sample

If you open this PNG in Photoshop, you will see what I mean.

share|improve this question
    
From what you said, you don't want an Alpha Channel, you need a Layer Mask. Please see my updated answer. –  Django Reinhardt May 20 '11 at 12:51
1  
Actually I need alpha, but please give me some more time to verify your answer and get back to you. What I want is exist in Adobe Fireworks... but not Photoshop. –  Pablo May 21 '11 at 14:22
    
Well I gave you the Alpha Channel, but you decided it wasn't what you wanted. I'd suggest giving the Layer Mask option a go, as this has the effects you say you desire. –  Django Reinhardt May 25 '11 at 13:16
add comment

2 Answers

up vote 3 down vote accepted

Create a totally black layer (raster or vector). Then...

Layer > Add Layer Mask

Will add a totally white mask to your layer. This will be the alpha channel. When you watch channels (by clicking the Channels tab next to Layers) you will see this alpha channel as

Layer 0 Mask

Now you can copy-paste the grayscale image (or any channel) to this and there you have it. Use CTRL + I to invert it.

share|improve this answer
    
How did my answer not give you the exact same result?? –  Django Reinhardt May 30 '11 at 2:00
add comment

Ok, this is very easy.

  1. Go to the CHANNELS tab.
  2. You should see "Gray" next to the thumbnail of the image you want (if you don't see "Gray", then your image is not grayscale).
  3. Ctrlclick (or click, if you're on a Mac) on the thumbnail image next to "Gray". This will select all the white areas of the image.
  4. While the white areas remain selected, go back to the LAYERS tab and select the layer with your image on it.
  5. Now go to the top menu and select: Layer > Layer Mask > Hide Selection. If "Layer Mask" is not selectable, then make sure your image layer isn't set to background (if it is, double click on it, and then click "OK" in the window that opens. It should now be set to "Layer 0").

All white areas will now be transparent in Photoshop.

Here's an image done with the above technique:

image edited with the above technique

share|improve this answer
    
I've got the negative version. However, the image is not transparent. What I was expecting is to see background image transparently on white areas when I bring this grayscale image on top of other. This is not happening. Also I was expecting on the grayscale image itself to see the default photohop background transparency grid. –  Pablo May 17 '11 at 16:17
    
I see. I think you phrased your question wrong, then. You don't want an Alpha Channel, you want a Layer Mask. I'll update my answer for you. –  Django Reinhardt May 17 '11 at 19:54
    
note that, if you save this file with layer mask as a standard tiff without layers, the transparency will be lost, and the transparent portions described by the mask will be white. (With tiff, the alpha is a channel). So the method you use depends on the desired result file. –  horatio May 17 '11 at 20:49
    
horatio, that simply isn't true at all. Simply ensure that "Save transparency" is enabled in the "TIFF Options" window when you save, and the transparency from the Layer Mask will be saved, even when you choose "Discard layers". Don't believe me? Try it for yourself. –  Django Reinhardt May 17 '11 at 21:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.