Hi all,
I'm sure that this is a relatively simple question, and many others must have faced it, but I can't find anything useful anywhere online - I'm sure I'm searching for the wrong thing, but hopefully someone can point me in a sensible direction.
Essentially I'm trying to obtain an image (GIF, JPEG or PNG ideally) from a component, but with a resolution of 300dpi (for printing) rather than the 72dpi that I have currently.
I'm pretty poor on graphics stuff, so apologies if this is badly described, most of what I've got so far is pieced together from various other sources.
I have a BufferedImage which is created with a JComponent.print() call, in short:
(EDIT: should have mentioned that 'graph' is the component, but that's probably obvious

)
Doing this, and simply passing the image to
works, but gives me an image with a resolution of 72dpi, which is far too poor for good quality printing.
The component has the ability to scale itself, so by scaling it (by 4x), then doing the above code, and writing the image file, I get a larger image file, still at 72dpi (unsurprisingly). I can then open the image in Photoshop, and increase the resolution to 300dpi, without resampling, which reduces the size of the image in proportion, and this gives me what I'm looking for. The question: how to do this in code, so that the image I export has my original dimensions, but at 300dpi?
[ August 14, 2006: Message edited by: David Payne ]