PIL - gif image

Erik Max Francis max at alcyone.com
Thu Jan 9 02:57:14 CET 2003


Simon Dahlbacka wrote:

> I don't know if there's something I've missed in the docs or what, but
> how
> do I translate the index I get from getpixel(xy) into a real color,
> i.e. rgb
> values? I'm trying to get hold of the real color values of 
> particular
> pixel in a paletted image.. (gif)

Check the .palette attribute, which for an image with mode 'P' will be
an instance of an ImagePalette.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Strange is our situation here upon earth.
\__/ Albert Einstein
    ZOE / http://www.alcyone.com/pyos/zoe/
 A simple Python OpenGL rendering engine.




More information about the Python-list mailing list