title: Programmatically change image resolution
body: <p>I have calculated that if I want my generated image to be A4 size @ 600dpi  for print purpose, it needs to be 7016x4961px @ 72dpi. So, I generate it programmatically, then test it in Photoshop and it seems to be fine so if I resize it, it gets proper size and resolution </p>
  
  <p><img src="https://i.stack.imgur.com/hegti.jpg" alt="Image size dialog in Photoshop">. </p>
  
  <p>What I wonder about is if it's possible to make this resizing programmatically, preferably with PIL, but not necessarily with it. I need to make it higher DPI.</p>