Answers for "create a png image in javascript using canvas"

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