[Image-SIG] Help GIF format

Oliver Albrecht 550283447739-0001 at t-online.de
Tue May 31 15:00:52 CEST 2005


by Fredrik Lundh Jul 11 1998
> When writing GIF files, PIL uses a simpleminded encoding that, by some
> odd reason, LZW decoders have no trouble reading.  To write compressed
> GIF files, there are a number of options:
> 
>     -- install NETPBM, and hack GifImagePlugin so it uses _save_ppm instead
>        of _save (just remove "_ppm" from the latter).
>     -- write an _imaging_gif module that takes a PIL image and writes
>        a GIF version of it.  how you implement that is up to you...

_imaging_gif  has anyone this module?
I try compile my model with py2exe, but it hold on GifImagePlugin on 
line  ['_imaging_gif'] sould i delete this line!?

and a additional little color question:
how can i simple replace one color?
here my means:
         im_pal=[]
         img_pall=im.getpalette()
         for RGB in xrange(0,len(img_pall),3):
             pal_tmp=img_pall[RGB:RGB+3]
             if pal_tmp==[0, 0, 132]:
                 pal_tmp=[255, 0, 255]
             im_pal[RGB:RGB]=pal_tmp
         im.putpalette(im_pal)
-- 
<!--Olliminatore-->


More information about the Image-SIG mailing list