javascript - Capture HTML Canvas as gif/jpg/png/pdf? -
is possible capture or print what's displayed in html canvas image or pdf?
i'd generate image via canvas, , able generate png image.
oops. original answer specific similar question. has been revised:
var canvas = document.getelementbyid("mycanvas"); var img = canvas.todataurl("image/png");
with value in img can write out new image so:
document.write('<img src="'+img+'"/>');
Comments
Post a Comment