Newbie : Gif transparency with Pil problem.

Gustavo Campanelli birdiepageANTI at SPAMciudad.FILTERcom.ar
Tue Dec 16 00:12:35 CET 2003


I have a "base trans.gif", which I created with transparency set to the 
same colour as the background. However when I read the file and try 
something on it and then save it under a new name, the transparency goes 
away, and the file goes from 1.06 kb to 1.05 kb, as if something is 
missing (which I think is the alpha channel). When I compare image 
properties with Irfanview (my image browser, and the program I used to 
create the gif) the only differences are file size and transparency ( I 
guess I should change base color for the text as well, but that's not 
the issue here).

Sample Code:

import Image, ImageDraw
firmada = Image.open("base trans.gif")
dibujo = ImageDraw.Draw(firmada)
dibujo.text ([50,50],"texto")
firmada.save ("prueba.gif")


Gedece, Python Newbie




More information about the Python-list mailing list