0

I am trying to search if there is a way to convert a piece of a canvas to a dataURI. Right now I have

canvas.drawImage(canvas, sx, sy, sw, sh, dx, dy, dw, dh);
data = canvas.toDataURL('image/jpeg'); 

the drawimage gets called hundreds, maybe thousands of times and it's very expensive time-wise. If this step could be skipped it could significant speed things up.

Any thoughts or ideas?

JerryFox
  • 615
  • 2
  • 13
  • 25
  • 1
    I'm not sure I understand, why don't you just skip it then? Are you not waiting until all the `canvas.drawImage()`s are done before converting to a data url? What do you mean by a piece? Do you only want a portion of your canvas converted? – zero298 Sep 17 '15 at 23:35
  • Isn't it some kind of duplicate of [your other question](http://stackoverflow.com/questions/32639839/convert-piece-of-canvas-to-blob-type)? – Kaiido Sep 18 '15 at 04:32
  • the drawimage only get a piece of the canvas. I still want the data uri but not from the entire canvas – JerryFox Sep 18 '15 at 18:02

0 Answers0