Skip to content

Instantly share code, notes, and snippets.

@florentb
Created July 27, 2016 10:26
Show Gist options
  • Save florentb/b272e0c89e20b05a271a93c5d990e045 to your computer and use it in GitHub Desktop.
Save florentb/b272e0c89e20b05a271a93c5d990e045 to your computer and use it in GitHub Desktop.
Sharp example
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