Newbie : Gif transparency with Pil problem.

G

Gustavo Campanelli

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top