colors of GIF images

Erik Max Francis max at alcyone.com
Sat Dec 7 13:11:50 EST 2002


Michele Simionato wrote:

> Given a GIF image, for each pixel I would like to estract a tuple
> (x,y,c)
> where x and y are the pixel coordinates and c is the pixel color.
> How can I do that ? Speed is not an issue, I only need it for small
> images.
> I guess I need PIL, or maybe I can go without PIL (which would be
> preferable).
> Any suggestion ?

Use PIL.  Without PIL, you'd have to write the GIF decoder yourself,
which is taking a trivial task and making it non-trivial.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Nothing spoils a confession like repentence.
\__/ Anatole France
    Physics reference / http://www.alcyone.com/max/reference/physics/
 A physics reference.



More information about the Python-list mailing list