I have a logo image which I need to make transparent for my web page. I need the black parts of the image to be transparent while the white is opaque and the greys are of various levels of transparency depending on each pixel's luminosity.
Use the image as an alpha mask. Take this black and white "logo" as an example:
Select All and Copy (or Copy Merged if you have multiple layers).
Create a new mask with the "New Layer Mask" button in the Layers panel (either on the your logo layer or a group containing your logo if it has multiple layers).
- Alt+Click the mask thumbnail to edit the mask (your canvas should turn completely white), then paste the image you previously copied. Click the layers thumbnail to finish editing the mask.
- As you can see, the semi-transparency defined by the various levels of gray are still gray in color too. If that isn't what you want then select all and fill the layer completely with white (or whatever color you want the logo to be).
Your now transparent logo: