SV: PIL - gif image
sdahlbac at abo.fi
Thu Jan 9 18:13:28 CET 2003
yes, it was just how to get access to what was in the .palette attribute I
wasn't sure about.. but anyhow, I did like this..
..but maybe there's an easier way?
Erik Max Francis <max at alcyone.com> skrev i
diskussionsgruppsmeddelandet:3E1CD6FA.B66F4C09 at alcyone.com...
> 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