Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2012 15:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4373726 to your computer and use it in GitHub Desktop.
Save anonymous/4373726 to your computer and use it in GitHub Desktop.
Using a request stream and directly send the image to graphicsmagick
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