Pinned Loading
-
Download the contents of an HTML5 ca...
Download the contents of an HTML5 canvas as an image 1function downloadCanvasAsImage(canvas, filename){
2let a = document.createElement("a")
3a.href = canvas.toDataURL()
4a.download = filename
5a.dispatchEvent(new MouseEvent("click"))
-
-
create-high-dpi-canvas
create-high-dpi-canvas Public archivea helper function to create HTML5 canvases that are compatible with high-DPI screens
JavaScript 1
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.