I want to resize photos, crop photos, etc. That's all.
But I need to be able to deal with PNG's and transparent png's.
Which one should I use?
Well they both need some other software installed on your OS (be it GraphicsMagick or ImageMagick), but node-gm has a nicer api, for example:
// crazytown
gm('/path/to/my/img.jpg')
.flip()
.magnify()
.rotate('green', 45)
.blur(7, 3)
.crop(300, 300, 150, 130)
.edge(3)
.write('/path/to/crazy.jpg', function (err) {
if (!err) console.log('crazytown has arrived');
})
The other module, node-imagemagick, has 4-5 functions, and for the rest you can pass in options.
In terms of performance you should compare ImageMagick with GraphicsMagick, some useful links here:
http://www.graphicsmagick.org/benchmarks.html
http://www.admon.org/graphicsmagick-vs-imagemagick/
http://news.ycombinator.com/item?id=886010
Also you should know that GraphicsMagick is derived from ImageMagick.
If you prefer speed, there's a faster (native addon) alternative.
https://npmjs.org/package/imagemagick-native
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With