Created
March 3, 2019 08:23
-
-
Save Joncom/bc7170c0767550eeeebcb77a97c0b362 to your computer and use it in GitHub Desktop.
How to download canvas.toDataURL image to disk
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 link = document.createElement('a'); | |
link.href = Main.backbuffer.g2canvas.canvas.canvas.toDataURL(); | |
link.download = 'coolimage.jpg'; | |
document.body.appendChild(link); | |
link.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment