Available in the LEADTOOLS Imaging toolkit.
BitmapXres and BitmapYres example for Visual J++
This example sets the bitmap's resolution to 300 x 600 DPI.
LEAD1.setBitmapXRes( (short) 300 ); LEAD1.setBitmapYRes( (short) 600 );