[Zope] help wanted: new PIL GIF encoder needs testing!

Fredrik Lundh fredrik@pythonware.com
Fri, 12 Feb 1999 15:40:38 +0100


(reposted from image-sig@python.org)

By some odd reason, I wrote a PCX encoder for PIL this
weekend. While PCX uses a simple run-length encoding
scheme, it still produced files that were much smaller
than the "uncompressed by legal reasons" GIF files you
get from the current version of PIL.

Anyway, when my good friend the mad scientist heard
about this, he asked me why I didn't use run-length
encoding also for the GIF files (while run-length en-
coding often gives smaller files, it's not even remotely
similar to the patented LZW algorithm)

After some experimentation, I've managed to write a new
GIF encoder which uses run-length encoding (this wasn't
exactly trivial ;-). this gives files that are typically 30%-50%
of the size generated by earlier versions (ranging from
exactly the same size as before, down to files that are
actually smaller than the corresponding GIF files...)

But I need your help in testing this on a larger sample
of GIF files and GIF readers. If you have some time to
spare, and a PIL 1.0b1 build within reach, you can grab
the "patch" from:

http://www.pythonware.com/madscientist/gif-990208.zip

replace libImaging/Gif.h and libImaging/GifEncode.c with
the versions in this file, and rebuild. You can then use
the checkgif.py script on a bunch of existing GIF files to
make sure it works on your data.

If you have some extra time to spare, you could also try
loading GIF files generated by this encoder with whatever
GIF-reading software you have.

Report your findings to me (I'm not on this list). If I don't
hear anything at all, or if I only hear positive things, this
will go into the next PIL release.

Cheers /F
fredrik@pythonware.com
http://www.pythonware.com