tags:

views:

1332

answers:

2

I have an application that I want to export high-resolution (or rather, high pixel density?) images for printing - for example, I want images that print at 250 dots per inch (DPI), instead of the default, which I understand to be 72 DPI.

I'm using a BufferedImage with a Graphics2D object to draw the image, then ImageIO.write() to save the image.

Any idea how I can set the DPI?

+1  A: 

First Google link:

http://www.tracemodeler.com/articles/aging-bugs-and-setting-dpi-with-java-image-io/

And it looks like it has the information you need.

A: 

I found this thread on Java-ImageIO-Interest:

http://archives.java.sun.com/cgi-bin/wa?A2=ind0409&L=java-imageio-interest&F=&S=&P=815

So, looks like it's not as easy as image.setDPI(200, 400).

David