Setting DPI-Value for Image Exports in Java

Hi all,

Recently, I tried to export a jpg and a bmp-file from a java-application and wanted to set the dpi-value to 300. Oh boy, that was not easy :-). That’s why I have the 2 links that finally helped me solve the problem collected here:

  • For jpg-files, please read the following (also read the chosen answer):
  • For bmp-files, the following method was very helpful (look at the answer from inflamer):

Funny, that since 2006, obviously there is still no easier option to write the DPI-value of a bitmap export (at least none that I found).

Author: markus

Leave a Reply

Your email address will not be published. Required fields are marked *

Please help avoiding spam: * Time limit is exhausted. Please reload CAPTCHA.