I am trying to create a transparent PNG image from a BufferedImage in Java.
The PNG will be loaded into another piece of the software, that does not support the alpha channel.
That should be fine, because, according to Chapter 8, section 5, part 4 of the PNG book, I can achieve transparency by specifying a pixel value to be transparent. This works by creating a tRNS
header in the png file.
I am unsure how to translate this technical detail to Java code. The actual image itself is monochrome; each pixel is going to be black or white. I would like to replace each white pixel with a transparent pixel, without using the alpha channel. May someone push me in the right direction please?