Answers for "js canvas to image"

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
0

javascript canvas to image

const Canvas = document.getElementById(Id); // Id here
return Canvas.toDataURL();
Posted by: Guest on July-18-2021
0

How to convert a canvas to an image javascript

function canvasURL(id) {
	let canvas = document.getElementById(id);
	return canvas.toDataURL(1.0);
}
Posted by: Guest on July-01-2021

Browse Popular Code Answers by Language