title: Convert small part of a canvas to png
body: <p>I turning my html5 canvas into a png using the following code:</p>
  
  <pre><code>var canvas = document.getElementById("mycanvas");
  var img    = canvas.toDataURL("image/png");
  document.write('&lt;img src="'+img+'"/&gt;');
  </code></pre>
  
  <p>What do I add to this so it will only grab the top left 150x100 pixels, instead of the whole canvas?</p>