Created
December 25, 2012 15:28
-
-
Save anonymous/4373726 to your computer and use it in GitHub Desktop.
Using a request stream and directly send the image to graphicsmagick
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 request = require('request'); | |
var fs = require('fs'); | |
var gm = require('gm'); | |
gm(request('http://image.blingee.com/images18/content/output/000/000/000/6d0/652887372_1455186.gif'), 'brabra.png') | |
.resize(240, 240) | |
.write('doodle2.png', function (err) { | |
if (!err) console.log('done'); | |
console.log(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment