Created
September 17, 2016 00:56
-
-
Save sedouard/b2a6244597f47d2d51f5dd6730881fb3 to your computer and use it in GitHub Desktop.
Canvas.js ToBlob
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
canvas.toBlob(function(blob) { | |
var fs = require('fs'), | |
out = fs.createWriteStream(__dirname + '/chart.png'); | |
out.write(jsdom.blobToBuffer(blob)); | |
}, "image/png"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment