[Image-SIG] How to save GIF files in 4 bit mode [PIL]
Douglas Bagnall
douglas@paradise.net.nz
Wed, 14 Feb 2001 09:59:34 +1300
hi,
>From: "Ilariu Raducan" <lale@zing.com>
> I tried to save an converted image with 16 colors in GIF format but it is
> too big 4,7kbytes.
> The same image converted with Gimp has only 2k.
> Can I do something about that?
>
This can be fixed on unix machines by using the standard netpbm library
for making gifs. If you look into GifImagePlugin.py in the PIL
directory, you'll find comments telling you which lines to change. It
really is easy, if you have netpbm installed.
You can also adapt the function there to make transparent gifs, code
for which I posted a wee while ago.
I'm not sure how possible it is to write new code that properly
compresses gifs, given the unco-operative stance that Unisys has over
its patents.
Douglas