title: slow down time take by domtoimage js
body: <p>I am using <a href="https://github.com/tsayen/dom-to-image" rel="nofollow noreferrer">domtoimage</a> library to convert html (with lots of CSS) to image.</p>
  
  <p>Actually I need high clarity image for printing purpose (600 DPI). So for this I scale (zoom) the html to 6.25(600/96) times, then I use domtoimage to capture it. I am successful as per my plans. My image is of high resolution and the printing clarity is also satisfactory.</p>
  
  <p>But the issue is with optimization. It takes too long time for domtomimage. I know this issue is because of html scaling, but I need high resolution image.</p>
  
  <p>Any idea for making this capture fast? My main focus is to reduce time taken by library to capture and create image.</p>
  
  <p>Note:</p>
  
  <ol>
  <li>I have also tried with phantom JS, but some css properties are not supported in it.</li>
  <li>I have also tried html2canvas which has also limitation with some CSS property</li>
  </ol>
  
  <p>Just for information I have added scale property to draw function</p>
  
  <pre><code>function draw(domNode, options) {
          return toSvg(domNode, options)
              .then(util.makeImage)
              .then(util.delay(100))
              .then(function (image) {
                  var canvas = newCanvas(domNode);
                 // canvas.getContext('2d').drawImage(image, 0, 0);
                  var ctx = canvas.getContext('2d');
                  if(options.scale){
                      ctx.scale(6.25,6.25);
                  }
                  ctx.drawImage(image, 0, 0);
                  return canvas;
              });
  
          function newCanvas(domNode) {
              var canvas = document.createElement('canvas');
               if(options.scale){
                   canvas.width = options.width || 6.25 * util.width(domNode); 
                   canvas.height = options.height || 6.25 * util.height(domNode); 
               }
               else{
                  canvas.width = options.width || util.width(domNode);
                  canvas.height = options.height || util.height(domNode);     
               }
  
              if (options.bgcolor) {
                  var ctx = canvas.getContext('2d');
                  ctx.fillStyle = options.bgcolor;
                  ctx.fillRect(0, 0, canvas.width, canvas.height);
              }
  
              return canvas;
          }
      }
  </code></pre>