Created
July 27, 2016 10:26
-
-
Save florentb/b272e0c89e20b05a271a93c5d990e045 to your computer and use it in GitHub Desktop.
Sharp example
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 fs = require('fs'); | |
var request = require('request'); | |
var sharp = require('sharp'); | |
request.get('https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg').pipe(sharp().resize(300).toFormat('png')).pipe(fs.createWriteStream('output.png')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment