[Image-SIG] Patch: Animated GIF loading

Sam Persson samiljan at gmail.com
Mon Jul 16 17:34:54 CEST 2007

When making a simple app displaying animated GIFs I noticed many images did
not look like they should when using PIL to load them. As I had nothing
better to do I started to try to figure out what was wrong. I ended up
making an own pure-python GIF-loader, which worked just like it should (like
firefox), but was quite slow. GIF is an interesting format.

The good thing was that I now understood how GIF-files worked, more or less,
and I managed to patch PIL to work the same way. The problems had to do with
palettes and transparency in animations.

The patch is attached. I don't know if I've done everything as it should be
done, but it works for all images I've tested.
I haven't tested saving GIFs with it, but there should be no difference I

/ Sam Persson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20070716/0944a5b7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gif-patch.diff
Type: application/octet-stream
Size: 9974 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20070716/0944a5b7/attachment.obj 

More information about the Image-SIG mailing list