Question

I have bene using node-imagemagick for a few days now and have come to realize that it has bugs.

There are about 100 forks of it, some of which fix some of the issues i have come across, but it is hard to figure out which fork i should use.

Was it helpful?

Solution 2

I chose to use gm node module on one of my project. It works pretty well.

See : http://aheckmann.github.com/gm/

It's basically a wrapper around imageMagick or graphicsmagick binaries.

Here is a simple example :

var gm = require('gm');
gm('/path/to/image.jpg')
.resize(353, 257)
.autoOrient()
.write(writeStream, function (err) {
  if (!err) console.log(' hooray! ');
});

OTHER TIPS

I once was in your position and after getting really frustrated with modules that had bugs or weird APIs I started using imagemagic directly by spawning a child process. Node.js is pretty good at this so it's actually not that hard.

var spawn = require('child_process').spawn;
var args = ['-ping', 'tree.gif' ];
var composite = spawn('identify', args);

It's also great because you can just use the imagemagic documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top