title: Reduce image PPI (Pixels Per Inch) with physical dimensions preservation
body: <p>I'm developing software for the printing industry, and I need to convert high quality and high PPI(for example 300) uploaded images to low PPI(for example 40) with the same physical dimensions in inch.<br/>
  for example, convert an image with 300 PPI and 10x10(inch x inch) to an image with 50 PPI and 10x10(inch x inch)<br/>
  this conversion is important because we want to display a low-quality image to the user with other transparent layers, due to preview actual final printing result.
  <br/>
  <br/>
  <a href="https://i.stack.imgur.com/Ie4EL.jpg" rel="nofollow noreferrer">this image is another example</a>
  <br/>
  <br/>
  how can I do this in Java or Kotlin?</p>