[Image-SIG] transparency on gif images (URGENT)

Denis Benoit benoitde@bigfoot.com
Wed, 5 Jan 2000 23:49:01 -0500 (EST)


Hi,

Last week I posted a recipe explaining how I manage to create a GIF with a
transparent background.  In short, the current version of PIL won't allow
you to save a transparent GIF if you don't modify the library yourself.

I must say that I'm NOT a PIL developer, so if you modify the source,
you're on your own.

Denis Benoit

On Thu, 6 Jan 2000, Bill Shui wrote:

> Hi
> 	I've encountered some problems whilst using PIL and trying to produce a
> gif file with transparency.
> 
> ####
> #  ##
> #  ##
> #####
>  ####
> 
> the above image is a double box 20x20 pixels in size.
> I wanted to set the top right and bottom left corner to transparent.
> 
> 
> in my code I have:
> 
> im = Image.open("doublebox.gif")
> im.info['transparency']=im.getpixel((19,0))
> 
> the resulting im.info shows
>  'transparency': 0}
> 
> then I did
> 
> im.save("mybox.gif")
> 
> and when I displayed it in netscape, the transparency did not work.
> 
> so I opened up image again using:
> 	im = Image.open("mybox.gif")
> >> im.info
> {'version': 'GIF87a', 'background': 0}
> 
> and the transparency is gone....
> 
> anyone knows how to set transparencies at all??????
> 
> 
> need help... URGENT
> 
> _______________________________________________
> Image-SIG maillist  -  Image-SIG@python.org
> http://www.python.org/mailman/listinfo/image-sig
>