[Image-SIG] How to compress Gif files with the GifImagePlugin
HSE, Graf Patrick
Tue, 6 Oct 1998 09:14:44 +0200
I'm using Python to upload image files to an Internet server.
This upload script does also some modification to the image (resize
with thumbnail function of the Image library).
This all works fine, but surprise, surprise if I upload a GIF image
the file increases the file size from 16k to 42k!!!
After some mailing with Frederik Ludth I was told, that the files are
saved uncompressed in Python.(License problems for this LWZ compressing
routine). But there is a possibility with the GifImagePlugin to compress the
Can anyone help me with this. I tried to use the GifImagePlugin and I also
the "register_save..:" entry at the bottom of the GifImagePlugin.py file as
Then I opened my image file and tried to save it with another filename. I got
that the file is in use by another process.
What am I doing wrong? I only want to save the Gif image file compressed as it
Thanks for any help
>>> import Image
>>> import GifImagePlugin
>>> im.save("c:\\temp4\\nv02.gif") # does this
save the file compressed ?
The process can not access the file becaus it's in use by another process.