[Image-SIG] Where is the indexed PNG alpha table ?

Douglas Bagnall douglas at paradise.net.nz
Sun Jan 30 10:13:23 CET 2005

I wrote:

>> In other words, the index is
>> not of RGB values, but of RGBA values.  

Ray Pasco wrote:

> I asked this because I just learned that indexed PNG
> images *can* have a 
> separate "alpha" index table in parallel with the
> color index table.

Yes, and these two sentences amount to the same thing -- "in parallel" 
is an implementation detail of the index.  You don't get more 
information out of it.

If you have such an image (I can't seem to make one with either the Gimp 
or PIL), have you tried:

 >>> im = Image.open('indexed.png').convert('RGBA')
 >>> r, g, b, a = im.split()
 >>> a.save('alpha.png')

alpha.png should be greyscale image containing only the alpha 
information from the original image.



More information about the Image-SIG mailing list