Hi all,
I have some graphs which I've rendered into some BufferedImages. These images are now going to be saved to disk as .PNG files as they must be loss less in the quality of the graphs. These files are to be used for publishing in various magazines, and these magazines have a requirement that the images must have a DPI of 600. Unfortunately, Windows saves with a DPI of 96, so I have to change this meta data.
I've spent the whole day on Google, trying to figure out what to do. The best post regarding the topic seems to be this one:
http://www.tracemodeler.com/articles/aging-bugs-and-setting-dpi-with-java-image-io/
-but the author doesn't really post the answer, he mainly outlines the problems.
I've gotten it to work for JPG's:
-but I can't use JPG's due to its limitations in regards to graphs, charts, etc.
As far as I can see, I need to change the meta data for the PNG files to set the DPI values, but first of all I can't find the value in the Tree as the page at tracemodeler.com talks about ... and next I can't really see how to make changes in the Nodes of this Tree. Please see below.
All very confusing, reading this post is probably confusing as well... but, please, is there anyone out there who knows what to do here? How do I change the DPI value of a PNG image within
Java?
Best regards,
Janus