Ray Pasco wrote: > If a PNG image with an alpha layer is opened, the im.mode will be "RGBA". > However, if an indexed PNG or GIF is opened with an alpha color set, > the mode is simply "P" (no "A" as in "PA"). > > 1) How can I get PIL to tell me if and what is the "alpha" color index ?
crop out the interesting pixel(s) and convert to RGBA, and use getpixel on the resulting image. > 2) When an RGBA image is converted to an indexed image, does PIL record > the occurance in some manner that any pixels had alpha values set to less > than 255 ? RGBA->P is equivalent to RGBA->RGB->P, so the answer is no. </F> _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
