PIL and getpixel()

devnew at gmail.com devnew at gmail.com
Tue Oct 16 19:38:30 CEST 2007


> Just pack the RGB values into an `int` by shifting and or-ing.  Untested:
>
> red, green, blue = img.getpixel(x, y)
> pixel_as_int = red << 16 | green << 8 | blue
>
> Ciao,
>         Marc 'BlackJack' Rintsch

thanx Marc

will try that
dn




More information about the Python-list mailing list