i need to do some modifications for a image file. so i load it, make my mods and save it to another file.
so i loaded my (transparent) png
dstImage = new BufferedImage(width, height, srcImage.getType());
did some voodoo and saved it back
ImageIO.write(dstImage, "png", new File(filename));
my problem is that all transparent pixels turn to black. if i use BufferedImage.TYPE_INT_ARGB, the transparency gets converted properly.
but the source image can be any type of bit depth…
wheres the mistake ?