ImageIO and transparent gif
I am having a bit of trouble with creating transparent gifs.
This gives me a transparent png with a black rectangle in the corner, but the gif goes all black:
BufferedImage img = new BufferedImage(50, 50, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = img.createGraphics();
g2.fillRect(0, 0, 10, 10);
ImageIO.write(img, "png", new File("c:/test.png"));
ImageIO.write(img, "gif", new File("c:/test.gif"));
Could someone give me a friendly pointer as to what I've missed?