Created
June 22, 2020 11:33
-
-
Save 0xlkda/ca687e52d684594d6b7124883cd1ada8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); | |
var link = document.getElementById('link'); | |
link.setAttribute('download', 'result.png'); | |
link.setAttribute('href', image); | |
link.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment