[Image-SIG] BUG animated gif PIL 1.1.7 Python 2.6.5

wormingdead at gmail.com wormingdead at gmail.com
Fri Feb 11 04:57:21 CET 2011

I have been using PIL to convert animated gifs to images using
ImageSequence and have found that one of my gifs is displaying random
pixels instead of transparency in the first frame.

original animated gif - made with Gimp 2.6.8 - http://tinypic.com/r/67idqw/7

first frame made with script below - http://tinypic.com/r/2uh642v/7

I discovered this using the tostring() method, though save() has the
same result. I am using Ubuntu 10.4 and the Ubuntu PIL package. If you
have any suggestions or information that could help, please let me
know. Thanks

script that saves first frame:

from PIL import Image, ImageSequence

gif = Image.open('loop.gif')

for i, frame in enumerate(ImageSequence.Iterator(gif)):
    frame.save('frame %d.gif' % i)

More information about the Image-SIG mailing list