title: Save Canvas with Background Image
body: <p>I have a background image for a canvas, and added a few basic elements to the canvas. Now I want to save the canvas (in .png), with the background image of the canvas style.</p>
  
  <p>Tried:</p>
  
  <pre><code>var canvas = document.getElementById("mycanvas");
  var img    = canvas.toDataURL("image/png");
  </code></pre>
  
  <p>But this doesn't seem to save the background image of the canvas. Is there a way out?</p>