Writing image metadata in Java, preferably PNG

Viewed 21955

I would like to write metadata to a PNG image that I create.

My understanding of Java Advanced Image API is that I should use IIOMetadata, but code snippets I found seem overly complicated. Then I searched for a library and found Sanselan but it seems a bit old, and not very handy for writing metadata.

To actually create the image, I use

ImageIO.write(image, "png", baos);

I understand image metadatas are complex to handle due to its XML-like structure. Could anybody point me to a tutorial, solution, or library that will help?

4 Answers
Related