title: Save a canvas image to disk
body: <p>Using js I was able to create a small script that is able to create random canvas images.<br />
  To transform them to png I do the following:</p>
  <pre><code>var dataURL = canvas.toDataURL(&quot;image/png&quot;);
  window.open(canvas.toDataURL('image/png'));
  </code></pre>
  <p>This is fine for seeing the images in a separate browser tab, but I'd like it to save it to disk whenever I run the program. Is this possible?</p>
  <p>Thanks.</p>