What colour model does the image use in PIL

Hrvoje Niksic hniksic at xemacs.org
Wed Nov 7 08:53:08 EST 2007


Johny <python at hope.cz> writes:

> I use PIL and with it im.getpixel((x,y)) to find out the colour of a
> pixel.  But how can I find out in which color model the the return
> value is?

im.mode gives you a string such as 'RGBA' or 'CMYK'.  im.getbands()
returns a tuple such as ('R', 'G', 'B', 'A').



More information about the Python-list mailing list