Native bindings for imagemagick to resize and compress images. This can be used to dynamically resize images in an express/connect based server. See examples/cdn.js for an example of connect middleware using magickwand.

Most other modules exposing imagemagick invoke the convert utility as a child process, instead of making direct C API calls. While this works, API calls are much faster than invoking convert, and that is the motivation for this module.

To maintain aspect ratio while resizing, set one of the width/height parameters to 0. The callback is passed an info
argument that has the width/height of the newly resized image, and is useful in case you chose to preserve the aspect
ratio

magickwand uses the C library by the same name, so libmagickwand-dev should be installed.

On Ubuntu, for example

sudo apt-get install libmagickwand-dev

On Mac - you can use homebrew to install imagemagick.

brew install pkg-config

brew install imagemagick --disable-openmp

I had trouble using the default recipe for imagemagick, as openmp would cause node process to hang.
Make sure you have disabled openmp while building Imagemagick.If you use homebrew, use the --disable-openmp
option while installing imagemagick.