title: dataToUrl() not working with loaded picture
body: <p>I am trying to make a download link for picture, everything works if i draw some stuff on canvas like background and text or leave empty, but if i draw image, dataToUrl do not generate a link. Code (shorten version, just to check if toDataUrl works: </p>
  
  <pre><code>$("#butt6").click(function() {
          var c = document.getElementById("PictureBIG");
          var ctx = c.getContext("2d");
          var img = document.getElementById("big1");
          ctx.drawImage(img, 0, 0, 900, 450);
          img.onload = function() {
              var dataUrl =  c.toDataURL('image/jpeg');
          }
          alert(dataUrl);
      });    
  </code></pre>
  
  <p>It doesnt alert anything at all.</p>