javascript - how to convert canvas as png when multiple images drawn using drawimage -
how render canvas image multiple image drawn on , image used draw cross origin.
while doing todataurl()
image draw isn't coming. in advance
this code
var canvas = document.getelementbyid("mycanvas"); var ctx = canvas.getcontext("2d"); baseimage = new image(); baseimage.src = '' + data.picture.data.url + ''; baseimage.onload = function() { ctx.drawimage(baseimage, 1, 1); } var dataurl = canvas.todataurl("image/png");
Comments
Post a Comment