title: What is the best practice to export canvas with high quality images?
body: <p>I need your help.
  I explain my situation: I’m using fabric.js library to place shapes, text, etc. in my application.
  My canvas size has 1000x1000 pixels (about 26.45x26.45 centimeters).
  I have an image upload script only for upload images in high quality, like 300 dpi.</p>
  
  <p>Basically what I do is the following:
  - draw the canvas (uploading images, put text, etc…);
  - resize the canvas multiplying by scale factor to be able at the end to have an image with 300dpi;
  - save the canvas in PNG format;
  - using php/ajax and Imagick, put the canvas with 300 dpi quality, saving in jpg format.</p>
  
  <p>The problem is: when I save the canvas, the quality of uploaded images will decrees, because I resize the canvas was 72 dpi (at the moment that I save in PNG).</p>
  
  <p>I think a possible solution is: when uploading the images, save the position in an array with x and y position and size to the end of the whole process, replace the image in JPG. If this is a best way, it is possible to make it with Imagick library or in PHP?</p>
  
  <p>I would like to know your opinion about it.</p>
  
  <p>Thank You.</p>