PDA

View Full Version : Transparent gif problem


senergy
2004-12-19, 06:22
i'm writing a little script that downloads a wind map for my area. problem is that the image is a gif with transparent background. when i display it the transparency becomes black, this looks terrible as well as messing up the black labels.

how can i keep the transparency of the image?
should i convert it to a png or jpg? are these a better picture format for keeping transparent backgrounds, if yes, how do convert a gif to a jpg?

pike
2004-12-19, 06:58
i'm by no means an expert in this field, but i believe we support transparent gif's, but not -all kinds-. there's a whole lot of different gif-creating applications. this doesnt help ypu much though. try and download it and resave it using eg photoshop or a jasc product and see if the transparancy works better now

senergy
2004-12-21, 05:04
i downloaded the .gif then used python image lib to convert it to a bmp, jpg, png but as soon as python touches the original gif it changes the transparent background to a black background no matter what format i save it as.
the only thing i can think of is using a server side script to download the image and convert it to something else then get python to download that image, very messy.
if anyone has a better way i would be most grateful.