Your question really helped me get an answer on the same issue. How it worked for me:
var express = require('express'), app = express.createServer(); app.get('/', function(req, res, next){ gm('images/test.jpg') .resize(50,50) .stream(function streamOut (err, stdout, stderr) { if (err) return next(err); stdout.pipe(res);
I deleted the entire link to the completion function because it is not defined, and sent an error to express the error handler. Hope this helps someone. I would also like to add that I use express 3, so creating a server is slightly different.
Marco Gabriel Godoy Lema
source share