Writing image metadata in Java, preferably PNG

前端 未结 4 1192
青春惊慌失措
青春惊慌失措 2020-12-02 21:38

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 snip

4条回答
  •  庸人自扰
    2020-12-02 22:09

    Java provides the metadata package and the ImageWriter class along with the ImageIO package.

    You create your IIOMetadata object, then getImageWriters for your BufferedImage or IIOImage and use them to write the metadata.

提交回复
热议问题