Answers for "how to convert a html canvas into a png file"

1

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+'"/>');
Posted by: Guest on October-15-2020

Code answers related to "how to convert a html canvas into a png file"

Browse Popular Code Answers by Language