PNG Alpha Channel

Black Hole

May contain traces of nut
I'm trying to extract the alpha channel of a PNG to use as a transparency layer - you would think it would be easy but I can't find a way to do it (not in PhotoPlus anyway, nor as a simple "app").

I'm sure it wouldn't be very difficult to write a simple app that shuffles or extracts image channels any how you like (RGB and alpha), but I don't need that diversion. It's actually quicker to recreate what I did to get to this point (and then make the mistake of saving as PNG instead of as a native PhotoPlus file, complete with mask layers) than mess about with it, but for future reference...
 
I'm trying to extract the alpha channel of a PNG to use as a transparency layer - you would think it would be easy but I can't find a way to do it (not in PhotoPlus anyway, nor as a simple "app").

I'm sure it wouldn't be very difficult to write a simple app that shuffles or extracts image channels any how you like (RGB and alpha), but I don't need that diversion. It's actually quicker to recreate what I did to get to this point (and then make the mistake of saving as PNG instead of as a native PhotoPlus file, complete with mask layers) than mess about with it, but for future reference...

Sorry I'm too busy at the moment, but if I knew what the heck you were talking about, I'm sure I could make the time! :D
 
I have found a work-around: for all colour channels, adjust the curves so that all values of RGB map to 255,255,255. Position the resulting black-with-alpha over a black background, and merge - the result is the equivalent of the original alpha channel, which can be copied and pasted into a layer mask.
 
if I knew what the heck you were talking about...

Image formats such as JPG use pixels with three values: Red, Green, and Blue. If you want to create a graphic that can be layered over another image, it's no good using a JPG because what you get is a rectangular image whether the object is rectangular or not.

The way around this is to have a fourth "colour" channel, which describes which pixels in the image should be transparent. This means you can create a mask which matches the outline of, say, a ball, and then use it as a graphic in a composition. However, if a pixel is either 100% coloured or 100% transparent, the result is unrealistic because the edge has "jaggies" (the equivalent of aliasing when pixel colour isn't blended). That is combated by making the edge between transparent and opaque fuzzy using intermediate values of transparency 0-255. The transparency value for each pixel is called the alpha channel, and requires an image file format that supports it - eg PNG.

Unfortunately, importing a PNG into PhotoPlus (my preferred image editor) does not split it into RGB plus a layer mask. Somehow, the image itself has the transparency merged into it - hence my work-around (which should work in any mainstream image editor).

An external utility (or even an editor add-in) would analyse the 32-bit PNG and create an 8-bit monochrome PNG from it, comprising only the data from the original alpha channel. Even more useful if the user could select any input channel for the output.
 
Anyone who has done more than casual image processing ("photoshopping") would know all about mask layers and graduated transparency. If you've tried to compose complex documents with illustrations, you know the value of images with transparent backgrounds (and therefore an image format that can support an alpha channel).
 
Back
Top