title: Clean solution to set DPI on created PNG images
body: <p>I would like to create PNG images using PHP on a website. These shall be printed at a defined scale. So I would like to set the DPI value of the images using PHP directly. Unfortunately I did not find any function call for this.</p>
  
  <p>Is there any function that can set/update metadata of PNG files?
  Maybe an other solution is more reasonable as using a HTML-Wrapper with CSS style sheet for printing which externally defines the resolution. But I would prefer the "directly on the image" approach...</p>