how do I convert (say the attached TFT.png image) to a GIF without losing the transparency.
Using Gimp there's no problem doing it, I just go to File->Save as a gif image and I'm done, the result is attached as TFT.gif.
However Java replaces the transparent pixels with black ones when saving to GIF, see image TFT.java.gif
Does anyone know how to solve this issue?
Heres' the code I'm using:
// File f is a PNG file
FileInputStream fin = new FileInputStream(f);
BufferedImage image = ImageIO.read(fin);
//now the extension becomes .gif
String sPath = f.getPath() + ".gif";
//saving as GIF..
ImageIO.write(image, "GIF", new File(sPath));