Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js generate pnh

var canvas = document.createElement("canvas");

canvas.width = 200;
canvas.height = 200;

var url = canvas.toDataURL();

var a = document.createElement('a');
a.download = 'my.png';
a.href = url;
a.textContent = 'Download PNG';



document.body.appendChild(a);
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #generate #pnh
ADD COMMENT
Topic
Name
7+4 =