title: Canvas toDataURL() method is saving low resolution image
body: <p>I have made a polygonal background generator using HTML5 canvas over at:</p>
  
  <p><a href="http://codepen.io/rfalor/pen/LhinJ" rel="nofollow">http://codepen.io/rfalor/pen/LhinJ</a></p>
  
  <p>This is the relevant code:</p>
  
  <pre><code>var canvas = document.getElementById("canvas");
  var ctx = canvas.getContext("2d");
  var dataURL = canvas.toDataURL();
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  document.getElementById('canvasImg').src = dataURL;
  </code></pre>
  
  <p>When an user clicks the canvas, and subsequently "Prepare Image", the image that is saved on right click is of low resolution(300px x 150px), instead of the canvas resolution. How do I allow the user to save a higher resolution image? </p>