Answers for "canvas to 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

Browse Popular Code Answers by Language