Daisy Kim
0
Q:

how to convert a html canvas into a png file

let canvas = document.getElementById("mycanvas");
let img = canvas.toDataURL("image/png");
document.write('<img src="'+img+'"/>');
1

New to Communities?

Join the community