node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


node-gm-bin Build Status

GraphicsMagick Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows.

Example usage

var execFile = require('child_process').execFile;
var binPath = require('gm-bin').path;
execFile(binPath, 'composite -compose CopyGreen green.png red.png red-green.png'.split(/\s+/), function(err, stdout, stderr) {
    // balabala... 

You can also run it directly from ./node_modules/.bin/gm-bin

GraphicsMagick Utilities

GraphicsMagick provides a powerful command line utility gm, which may be used to access all GraphicsMagick functions. Gm uses a consistent set of options (see options documentation). GraphicsMagick provides access to major commands via a single executable command-line program; for example, to use the "convert" sub-command, type gm convert .... The available commands are as follows:

animate Animate a sequence of images
batch Executes an arbitary number of utility commands
benchmark Measure and report utility command performance.
compare Compare two images using statistics and/or visual differencing
composite Composite images together
conjure Execute a Magick Scripting Language (MSL) XML script
convert Convert an image or sequence of images
display Display an image on a workstation running X
identify Describe an image or image sequence
import Capture an application or X server screen
mogrify Transform an image or sequence of images
montage Create a composite image (in a grid) from separate images
time Time the execution of a utility command.
version Report GraphicsMagick version, features, and build options.