title: Use clearRect to erase part of a png image drawn to canvas with drawImage
body: <p>Is it possible to use clearRect to delete part of a png image drawn to the canvas using drawImage?</p>
  
  <p>I'm trying something like this and its not working:</p>
  
  <pre><code>&lt;canvas id="canvas"&gt;&lt;/canvas&gt;
  &lt;img id="pngimg" src="" alt="" /&gt;
  
  [...]
  
  canvas = document.getElementById("canvas");
  pngimg = document.getElementById("pngimg");
  
  [...]
  
  pngimg.src = canvas.toDataURL();
  context.drawImage(pngimg, 0, 0, canvas.width, canvas.height);
  
  [...]
  </code></pre>
  
  <p>Then using clearRect to erase with the mouse.  The erase works on the strokes that were added to the canvas using drawLine but not for images using drawImage.  It must be clearRect instead of drawing a solid color because the background isn't solid. Is it possible to do this?</p>