When I use the gm.toBuffer, the image is not manipulated at all. The only exception is that if I pass in the image type, it will change, but the image is not getting resized. It works if I spit out the file to the disk, but in this case I'd like to write it directly into the database.
I've also tried installing imagemagick and doing the subclass, but I get the same result. I am running Windows 7.
Here is what my logic looks like:
var gm = require('gm');
gm(req.files.file.path)
.resize(256, 256)
.toBuffer(function(err, data) {
if (err) { throw err; }
Users.updateById(uid, {$set: {
photo256: data
}});
});