package.json 29.2 KB
{
  "_args": [
    [
      {
        "raw": "gm",
        "scope": null,
        "escapedName": "gm",
        "name": "gm",
        "rawSpec": "",
        "spec": "latest",
        "type": "tag"
      },
      "/Users/fzy/project/koa2_Sequelize_project/util/Agora_Recording_SDK_for_Linux_FULL/samples"
    ]
  ],
  "_from": "gm@latest",
  "_id": "gm@1.23.0",
  "_inCache": true,
  "_location": "/gm",
  "_nodeVersion": "4.4.6",
  "_npmOperationalInternal": {
    "host": "packages-16-east.internal.npmjs.com",
    "tmp": "tmp/gm-1.23.0.tgz_1470262815186_0.940796471433714"
  },
  "_npmUser": {
    "name": "aaron",
    "email": "aaron.heckmann+github@gmail.com"
  },
  "_npmVersion": "2.15.5",
  "_phantomChildren": {},
  "_requested": {
    "raw": "gm",
    "scope": null,
    "escapedName": "gm",
    "name": "gm",
    "rawSpec": "",
    "spec": "latest",
    "type": "tag"
  },
  "_requiredBy": [
    "#DEV:/",
    "#USER"
  ],
  "_resolved": "https://registry.npmjs.org/gm/-/gm-1.23.0.tgz",
  "_shasum": "80a2fe9cbf131515024846444658461269f52661",
  "_shrinkwrap": null,
  "_spec": "gm",
  "_where": "/Users/fzy/project/koa2_Sequelize_project/util/Agora_Recording_SDK_for_Linux_FULL/samples",
  "author": {
    "name": "Aaron Heckmann",
    "email": "aaron.heckmann+github@gmail.com"
  },
  "bugs": {
    "url": "http://github.com/aheckmann/gm/issues"
  },
  "dependencies": {
    "array-parallel": "~0.1.3",
    "array-series": "~0.1.5",
    "cross-spawn": "^4.0.0",
    "debug": "~2.2.0"
  },
  "description": "GraphicsMagick and ImageMagick for node.js",
  "devDependencies": {
    "async": "~0.9.0",
    "gleak": "~0.5.0"
  },
  "directories": {},
  "dist": {
    "shasum": "80a2fe9cbf131515024846444658461269f52661",
    "tarball": "https://registry.npmjs.org/gm/-/gm-1.23.0.tgz"
  },
  "engines": {
    "node": ">= 0.10.0"
  },
  "gitHead": "d650da6a1ca446c23641dba8d7e98c12e3f3b26c",
  "homepage": "https://github.com/aheckmann/gm#readme",
  "keywords": [
    "graphics",
    "magick",
    "image",
    "graphicsmagick",
    "imagemagick",
    "gm",
    "convert",
    "identify",
    "compare"
  ],
  "license": "MIT",
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ],
  "main": "./index",
  "maintainers": [
    {
      "name": "aaron",
      "email": "aaron.heckmann+github@gmail.com"
    },
    {
      "name": "jongleberry",
      "email": "me@jongleberry.com"
    },
    {
      "name": "rwky",
      "email": "admin@rwky.net"
    },
    {
      "name": "fragphace",
      "email": "fragphace@gmail.com"
    }
  ],
  "name": "gm",
  "optionalDependencies": {},
  "readme": "\n# gm [![Build Status](https://travis-ci.org/aheckmann/gm.png?branch=master)](https://travis-ci.org/aheckmann/gm)  [![NPM Version](https://img.shields.io/npm/v/gm.svg?style=flat)](https://www.npmjs.org/package/gm)\n\nGraphicsMagick and ImageMagick for node\n\n## Bug Reports\n\nWhen reporting bugs please include the version of graphicsmagick/imagemagick you're using (gm -version/convert -version) as well as the version of this module and copies of any images you're having problems with.\n\n## Getting started\nFirst download and install [GraphicsMagick](http://www.graphicsmagick.org/) or [ImageMagick](http://www.imagemagick.org/). In Mac OS X, you can simply use [Homebrew](http://mxcl.github.io/homebrew/) and do:\n\n    brew install imagemagick\n    brew install graphicsmagick\n\nIf you want WebP support with ImageMagick, you must add the WebP option:\n\n    brew install imagemagick --with-webp\n\nthen either use npm:\n\n    npm install gm\n\nor clone the repo:\n\n    git clone git://github.com/aheckmann/gm.git\n\n\n## Use ImageMagick instead of gm\n\nSubclass `gm` to enable ImageMagick\n\n```js\nvar fs = require('fs')\n  , gm = require('gm').subClass({imageMagick: true});\n\n// resize and remove EXIF profile data\ngm('/path/to/my/img.jpg')\n.resize(240, 240)\n...\n```\n\n\n## Basic Usage\n\n```js\nvar fs = require('fs')\n  , gm = require('gm');\n\n// resize and remove EXIF profile data\ngm('/path/to/my/img.jpg')\n.resize(240, 240)\n.noProfile()\n.write('/path/to/resize.png', function (err) {\n  if (!err) console.log('done');\n});\n\n// some files would not be resized appropriately\n// http://stackoverflow.com/questions/5870466/imagemagick-incorrect-dimensions\n// you have two options:\n// use the '!' flag to ignore aspect ratio\ngm('/path/to/my/img.jpg')\n.resize(240, 240, '!')\n.write('/path/to/resize.png', function (err) {\n  if (!err) console.log('done');\n});\n\n// use the .resizeExact with only width and/or height arguments\ngm('/path/to/my/img.jpg')\n.resizeExact(240, 240)\n.write('/path/to/resize.png', function (err) {\n  if (!err) console.log('done');\n});\n\n// obtain the size of an image\ngm('/path/to/my/img.jpg')\n.size(function (err, size) {\n  if (!err)\n    console.log(size.width > size.height ? 'wider' : 'taller than you');\n});\n\n// output all available image properties\ngm('/path/to/img.png')\n.identify(function (err, data) {\n  if (!err) console.log(data)\n});\n\n// pull out the first frame of an animated gif and save as png\ngm('/path/to/animated.gif[0]')\n.write('/path/to/firstframe.png', function (err) {\n  if (err) console.log('aaw, shucks');\n});\n\n// auto-orient an image\ngm('/path/to/img.jpg')\n.autoOrient()\n.write('/path/to/oriented.jpg', function (err) {\n  if (err) ...\n})\n\n// crazytown\ngm('/path/to/my/img.jpg')\n.flip()\n.magnify()\n.rotate('green', 45)\n.blur(7, 3)\n.crop(300, 300, 150, 130)\n.edge(3)\n.write('/path/to/crazy.jpg', function (err) {\n  if (!err) console.log('crazytown has arrived');\n})\n\n// annotate an image\ngm('/path/to/my/img.jpg')\n.stroke(\"#ffffff\")\n.drawCircle(10, 10, 20, 10)\n.font(\"Helvetica.ttf\", 12)\n.drawText(30, 20, \"GMagick!\")\n.write(\"/path/to/drawing.png\", function (err) {\n  if (!err) console.log('done');\n});\n\n// creating an image\ngm(200, 400, \"#ddff99f3\")\n.drawText(10, 50, \"from scratch\")\n.write(\"/path/to/brandNewImg.jpg\", function (err) {\n  // ...\n});\n```\n\n## Streams\n\n```js\n// passing a stream\nvar readStream = fs.createReadStream('/path/to/my/img.jpg');\ngm(readStream, 'img.jpg')\n.write('/path/to/reformat.png', function (err) {\n  if (!err) console.log('done');\n});\n\n\n// passing a downloadable image by url\n\nvar request = require('request');\nvar url = \"www.abc.com/pic.jpg\"\n\ngm(request(url))\n.write('/path/to/reformat.png', function (err) {\n  if (!err) console.log('done');\n});\n\n\n// can also stream output to a ReadableStream\n// (can be piped to a local file or remote server)\ngm('/path/to/my/img.jpg')\n.resize('200', '200')\n.stream(function (err, stdout, stderr) {\n  var writeStream = fs.createWriteStream('/path/to/my/resized.jpg');\n  stdout.pipe(writeStream);\n});\n\n// without a callback, .stream() returns a stream\n// this is just a convenience wrapper for above.\nvar writeStream = fs.createWriteStream('/path/to/my/resized.jpg');\ngm('/path/to/my/img.jpg')\n.resize('200', '200')\n.stream()\n.pipe(writeStream);\n\n// pass a format or filename to stream() and\n// gm will provide image data in that format\ngm('/path/to/my/img.jpg')\n.stream('png', function (err, stdout, stderr) {\n  var writeStream = fs.createWriteStream('/path/to/my/reformatted.png');\n  stdout.pipe(writeStream);\n});\n\n// or without the callback\nvar writeStream = fs.createWriteStream('/path/to/my/reformatted.png');\ngm('/path/to/my/img.jpg')\n.stream('png')\n.pipe(writeStream);\n\n// combine the two for true streaming image processing\nvar readStream = fs.createReadStream('/path/to/my/img.jpg');\ngm(readStream)\n.resize('200', '200')\n.stream(function (err, stdout, stderr) {\n  var writeStream = fs.createWriteStream('/path/to/my/resized.jpg');\n  stdout.pipe(writeStream);\n});\n\n// GOTCHA:\n// when working with input streams and any 'identify'\n// operation (size, format, etc), you must pass \"{bufferStream: true}\" if\n// you also need to convert (write() or stream()) the image afterwards\n// NOTE: this buffers the readStream in memory!\nvar readStream = fs.createReadStream('/path/to/my/img.jpg');\ngm(readStream)\n.size({bufferStream: true}, function(err, size) {\n  this.resize(size.width / 2, size.height / 2)\n  this.write('/path/to/resized.jpg', function (err) {\n    if (!err) console.log('done');\n  });\n});\n\n```\n\n## Buffers\n\n```js\n// A buffer can be passed instead of a filepath as well\nvar buf = require('fs').readFileSync('/path/to/image.jpg');\n\ngm(buf, 'image.jpg')\n.noise('laplacian')\n.write('/path/to/out.jpg', function (err) {\n  if (err) return handle(err);\n  console.log('Created an image from a Buffer!');\n});\n\n/*\nA buffer can also be returned instead of a stream\nThe first argument to toBuffer is optional, it specifies the image format\n*/\ngm('img.jpg')\n.resize(100, 100)\n.toBuffer('PNG',function (err, buffer) {\n  if (err) return handle(err);\n  console.log('done!');\n})\n```\n\n## Custom Arguments\n\nIf `gm` does not supply you with a method you need or does not work as you'd like, you can simply use `gm().in()` or `gm().out()` to set your own arguments.\n\n- `gm().command()` - Custom command such as `identify` or `convert`\n- `gm().in()` - Custom input arguments\n- `gm().out()` - Custom output arguments\n\nThe command will be formatted in the following order:\n\n1. `command` - ie `convert`\n2. `in` - the input arguments\n3. `source` - stdin or an image file\n4. `out` - the output arguments\n5. `output` - stdout or the image file to write to\n\nFor example, suppose you want the following command:\n\n```bash\ngm \"convert\" \"label:Offline\" \"PNG:-\"\n```\n\nHowever, using `gm().label()` may not work as intended for you:\n\n```js\ngm()\n.label('Offline')\n.stream();\n```\n\nwould yield:\n\n```bash\ngm \"convert\" \"-label\" \"\\\"Offline\\\"\" \"PNG:-\"\n```\n\nInstead, you can use `gm().out()`:\n\n```js\ngm()\n.out('label:Offline')\n.stream();\n```\n\nwhich correctly yields:\n\n```bash\ngm \"convert\" \"label:Offline\" \"PNG:-\"\n```\n\n### Custom Identify Format String\n\nWhen identifying an image, you may want to use a custom formatting string instead of using `-verbose`, which is quite slow.\nYou can use your own [formatting string](http://www.imagemagick.org/script/escape.php) when using `gm().identify(format, callback)`.\nFor example,\n\n```js\ngm('img.png').format(function (err, format) {\n\n})\n\n// is equivalent to\n\ngm('img.png').identify('%m', function (err, format) {\n\n})\n```\n\nsince `%m` is the format option for getting the image file format.\n\n## Platform differences\n\nPlease document and refer to any [platform or ImageMagick/GraphicsMagick issues/differences here](https://github.com/aheckmann/gm/wiki/GraphicsMagick-and-ImageMagick-versions).\n\n## Examples:\n\n  Check out the [examples](http://github.com/aheckmann/gm/tree/master/examples/) directory to play around.\n  Also take a look at the [extending gm](http://wiki.github.com/aheckmann/gm/extending-gm)\n  page to see how to customize gm to your own needs.\n\n## Constructor:\n\n  There are a few ways you can use the `gm` image constructor.\n\n  - 1) `gm(path)` When you pass a string as the first argument it is interpreted as the path to an image you intend to manipulate.\n  - 2) `gm(stream || buffer, [filename])` You may also pass a ReadableStream or Buffer as the first argument, with an optional file name for format inference.\n  - 3) `gm(width, height, [color])` When you pass two integer arguments, gm will create a new image on the fly with the provided dimensions and an optional background color. And you can still chain just like you do with pre-existing images too. See [here](http://github.com/aheckmann/gm/blob/master/examples/new.js) for an example.\n\nThe links below refer to an older version of gm but everything should still work, if anyone feels like updating them please make a PR\n\n## Methods\n\n  - getters\n    - [size](http://aheckmann.github.com/gm/docs.html#getters) - returns the size (WxH) of the image\n    - [orientation](http://aheckmann.github.com/gm/docs.html#getters) - returns the EXIF orientation of the image\n    - [format](http://aheckmann.github.com/gm/docs.html#getters) - returns the image format (gif, jpeg, png, etc)\n    - [depth](http://aheckmann.github.com/gm/docs.html#getters) - returns the image color depth\n    - [color](http://aheckmann.github.com/gm/docs.html#getters) - returns the number of colors\n    - [res](http://aheckmann.github.com/gm/docs.html#getters)   - returns the image resolution\n    - [filesize](http://aheckmann.github.com/gm/docs.html#getters) - returns image filesize\n    - [identify](http://aheckmann.github.com/gm/docs.html#getters) - returns all image data available. Takes an optional format string.\n\n  - manipulation\n    - [adjoin](http://aheckmann.github.com/gm/docs.html#adjoin)\n    - [affine](http://aheckmann.github.com/gm/docs.html#affine)\n    - [antialias](http://aheckmann.github.com/gm/docs.html#antialias)\n    - [append](http://aheckmann.github.com/gm/docs.html#append)\n    - [authenticate](http://aheckmann.github.com/gm/docs.html#authenticate)\n    - [autoOrient](http://aheckmann.github.com/gm/docs.html#autoOrient)\n    - [average](http://aheckmann.github.com/gm/docs.html#average)\n    - [backdrop](http://aheckmann.github.com/gm/docs.html#backdrop)\n    - [bitdepth](http://aheckmann.github.com/gm/docs.html#bitdepth)\n    - [blackThreshold](http://aheckmann.github.com/gm/docs.html#blackThreshold)\n    - [bluePrimary](http://aheckmann.github.com/gm/docs.html#bluePrimary)\n    - [blur](http://aheckmann.github.com/gm/docs.html#blur)\n    - [border](http://aheckmann.github.com/gm/docs.html#border)\n    - [borderColor](http://aheckmann.github.com/gm/docs.html#borderColor)\n    - [box](http://aheckmann.github.com/gm/docs.html#box)\n    - [channel](http://aheckmann.github.com/gm/docs.html#channel)\n    - [charcoal](http://aheckmann.github.com/gm/docs.html#charcoal)\n    - [chop](http://aheckmann.github.com/gm/docs.html#chop)\n    - [clip](http://aheckmann.github.com/gm/docs.html#clip)\n    - [coalesce](http://aheckmann.github.com/gm/docs.html#coalesce)\n    - [colors](http://aheckmann.github.com/gm/docs.html#colors)\n    - [colorize](http://aheckmann.github.com/gm/docs.html#colorize)\n    - [colorMap](http://aheckmann.github.com/gm/docs.html#colorMap)\n    - [colorspace](http://aheckmann.github.com/gm/docs.html#colorspace)\n    - [comment](http://aheckmann.github.com/gm/docs.html#comment)\n    - [compose](http://aheckmann.github.com/gm/docs.html#compose)\n    - [compress](http://aheckmann.github.com/gm/docs.html#compress)\n    - [contrast](http://aheckmann.github.com/gm/docs.html#contrast)\n    - [convolve](http://aheckmann.github.com/gm/docs.html#convolve)\n    - [createDirectories](http://aheckmann.github.com/gm/docs.html#createDirectories)\n    - [crop](http://aheckmann.github.com/gm/docs.html#crop)\n    - [cycle](http://aheckmann.github.com/gm/docs.html#cycle)\n    - [deconstruct](http://aheckmann.github.com/gm/docs.html#deconstruct)\n    - [delay](http://aheckmann.github.com/gm/docs.html#delay)\n    - [define](http://aheckmann.github.com/gm/docs.html#define)\n    - [density](http://aheckmann.github.com/gm/docs.html#density)\n    - [despeckle](http://aheckmann.github.com/gm/docs.html#despeckle)\n    - [dither](http://aheckmann.github.com/gm/docs.html#dither)\n    - [displace](http://aheckmann.github.com/gm/docs.html#dither)\n    - [display](http://aheckmann.github.com/gm/docs.html#display)\n    - [dispose](http://aheckmann.github.com/gm/docs.html#dispose)\n    - [dissolve](http://aheckmann.github.com/gm/docs.html#dissolve)\n    - [edge](http://aheckmann.github.com/gm/docs.html#edge)\n    - [emboss](http://aheckmann.github.com/gm/docs.html#emboss)\n    - [encoding](http://aheckmann.github.com/gm/docs.html#encoding)\n    - [enhance](http://aheckmann.github.com/gm/docs.html#enhance)\n    - [endian](http://aheckmann.github.com/gm/docs.html#endian)\n    - [equalize](http://aheckmann.github.com/gm/docs.html#equalize)\n    - [extent](http://aheckmann.github.com/gm/docs.html#extent)\n    - [file](http://aheckmann.github.com/gm/docs.html#file)\n    - [filter](http://aheckmann.github.com/gm/docs.html#filter)\n    - [flatten](http://aheckmann.github.com/gm/docs.html#flatten)\n    - [flip](http://aheckmann.github.com/gm/docs.html#flip)\n    - [flop](http://aheckmann.github.com/gm/docs.html#flop)\n    - [foreground](http://aheckmann.github.com/gm/docs.html#foreground)\n    - [frame](http://aheckmann.github.com/gm/docs.html#frame)\n    - [fuzz](http://aheckmann.github.com/gm/docs.html#fuzz)\n    - [gamma](http://aheckmann.github.com/gm/docs.html#gamma)\n    - [gaussian](http://aheckmann.github.com/gm/docs.html#gaussian)\n    - [geometry](http://aheckmann.github.com/gm/docs.html#geometry)\n    - [gravity](http://aheckmann.github.com/gm/docs.html#gravity)\n    - [greenPrimary](http://aheckmann.github.com/gm/docs.html#greenPrimary)\n    - [highlightColor](http://aheckmann.github.com/gm/docs.html#highlightColor)\n    - [highlightStyle](http://aheckmann.github.com/gm/docs.html#highlightStyle)\n    - [iconGeometry](http://aheckmann.github.com/gm/docs.html#iconGeometry)\n    - [implode](http://aheckmann.github.com/gm/docs.html#implode)\n    - [intent](http://aheckmann.github.com/gm/docs.html#intent)\n    - [interlace](http://aheckmann.github.com/gm/docs.html#interlace)\n    - [label](http://aheckmann.github.com/gm/docs.html#label)\n    - [lat](http://aheckmann.github.com/gm/docs.html#lat)\n    - [level](http://aheckmann.github.com/gm/docs.html#level)\n    - [list](http://aheckmann.github.com/gm/docs.html#list)\n    - [limit](http://aheckmann.github.com/gm/docs.html#limit)\n    - [log](http://aheckmann.github.com/gm/docs.html#log)\n    - [loop](http://aheckmann.github.com/gm/docs.html#loop)\n    - [lower](http://aheckmann.github.com/gm/docs.html#lower)\n    - [magnify](http://aheckmann.github.com/gm/docs.html#magnify)\n    - [map](http://aheckmann.github.com/gm/docs.html#map)\n    - [matte](http://aheckmann.github.com/gm/docs.html#matte)\n    - [matteColor](http://aheckmann.github.com/gm/docs.html#matteColor)\n    - [mask](http://aheckmann.github.com/gm/docs.html#mask)\n    - [maximumError](http://aheckmann.github.com/gm/docs.html#maximumError)\n    - [median](http://aheckmann.github.com/gm/docs.html#median)\n    - [minify](http://aheckmann.github.com/gm/docs.html#minify)\n    - [mode](http://aheckmann.github.com/gm/docs.html#mode)\n    - [modulate](http://aheckmann.github.com/gm/docs.html#modulate)\n    - [monitor](http://aheckmann.github.com/gm/docs.html#monitor)\n    - [monochrome](http://aheckmann.github.com/gm/docs.html#monochrome)\n    - [morph](http://aheckmann.github.com/gm/docs.html#morph)\n    - [mosaic](http://aheckmann.github.com/gm/docs.html#mosaic)\n    - [motionBlur](http://aheckmann.github.com/gm/docs.html#motionBlur)\n    - [name](http://aheckmann.github.com/gm/docs.html#name)\n    - [negative](http://aheckmann.github.com/gm/docs.html#negative)\n    - [noise](http://aheckmann.github.com/gm/docs.html#noise)\n    - [noop](http://aheckmann.github.com/gm/docs.html#noop)\n    - [normalize](http://aheckmann.github.com/gm/docs.html#normalize)\n    - [noProfile](http://aheckmann.github.com/gm/docs.html#profile)\n    - [opaque](http://aheckmann.github.com/gm/docs.html#opaque)\n    - [operator](http://aheckmann.github.com/gm/docs.html#operator)\n    - [orderedDither](http://aheckmann.github.com/gm/docs.html#orderedDither)\n    - [outputDirectory](http://aheckmann.github.com/gm/docs.html#outputDirectory)\n    - [paint](http://aheckmann.github.com/gm/docs.html#paint)\n    - [page](http://aheckmann.github.com/gm/docs.html#page)\n    - [pause](http://aheckmann.github.com/gm/docs.html#pause)\n    - [pen](http://aheckmann.github.com/gm/docs.html#pen)\n    - [ping](http://aheckmann.github.com/gm/docs.html#ping)\n    - [pointSize](http://aheckmann.github.com/gm/docs.html#pointSize)\n    - [preview](http://aheckmann.github.com/gm/docs.html#preview)\n    - [process](http://aheckmann.github.com/gm/docs.html#process)\n    - [profile](http://aheckmann.github.com/gm/docs.html#profile)\n    - [progress](http://aheckmann.github.com/gm/docs.html#progress)\n    - [quality](http://aheckmann.github.com/gm/docs.html#quality)\n    - [raise](http://aheckmann.github.com/gm/docs.html#raise)\n    - [rawSize](http://aheckmann.github.com/gm/docs.html#rawSize)\n    - [randomThreshold](http://aheckmann.github.com/gm/docs.html#randomThreshold)\n    - [recolor](http://aheckmann.github.com/gm/docs.html#recolor)\n    - [redPrimary](http://aheckmann.github.com/gm/docs.html#redPrimary)\n    - [region](http://aheckmann.github.com/gm/docs.html#region)\n    - [remote](http://aheckmann.github.com/gm/docs.html#remote)\n    - [render](http://aheckmann.github.com/gm/docs.html#render)\n    - [repage](http://aheckmann.github.com/gm/docs.html#repage)\n    - [resample](http://aheckmann.github.com/gm/docs.html#resample)\n    - [resize](http://aheckmann.github.com/gm/docs.html#resize)\n    - [roll](http://aheckmann.github.com/gm/docs.html#roll)\n    - [rotate](http://aheckmann.github.com/gm/docs.html#rotate)\n    - [sample](http://aheckmann.github.com/gm/docs.html#sample)\n    - [samplingFactor](http://aheckmann.github.com/gm/docs.html#samplingFactor)\n    - [scale](http://aheckmann.github.com/gm/docs.html#scale)\n    - [scene](http://aheckmann.github.com/gm/docs.html#scene)\n    - [scenes](http://aheckmann.github.com/gm/docs.html#scenes)\n    - [screen](http://aheckmann.github.com/gm/docs.html#screen)\n    - [segment](http://aheckmann.github.com/gm/docs.html#segment)\n    - [sepia](http://aheckmann.github.com/gm/docs.html#sepia)\n    - [set](http://aheckmann.github.com/gm/docs.html#set)\n    - [setFormat](http://aheckmann.github.com/gm/docs.html#setformat)\n    - [shade](http://aheckmann.github.com/gm/docs.html#shade)\n    - [shadow](http://aheckmann.github.com/gm/docs.html#shadow)\n    - [sharedMemory](http://aheckmann.github.com/gm/docs.html#sharedMemory)\n    - [sharpen](http://aheckmann.github.com/gm/docs.html#sharpen)\n    - [shave](http://aheckmann.github.com/gm/docs.html#shave)\n    - [shear](http://aheckmann.github.com/gm/docs.html#shear)\n    - [silent](http://aheckmann.github.com/gm/docs.html#silent)\n    - [solarize](http://aheckmann.github.com/gm/docs.html#solarize)\n    - [snaps](http://aheckmann.github.com/gm/docs.html#snaps)\n    - [stegano](http://aheckmann.github.com/gm/docs.html#stegano)\n    - [stereo](http://aheckmann.github.com/gm/docs.html#stereo)\n    - [strip](http://aheckmann.github.com/gm/docs.html#strip) _imagemagick only_\n    - [spread](http://aheckmann.github.com/gm/docs.html#spread)\n    - [swirl](http://aheckmann.github.com/gm/docs.html#swirl)\n    - [textFont](http://aheckmann.github.com/gm/docs.html#textFont)\n    - [texture](http://aheckmann.github.com/gm/docs.html#texture)\n    - [threshold](http://aheckmann.github.com/gm/docs.html#threshold)\n    - [thumb](http://aheckmann.github.com/gm/docs.html#thumb)\n    - [tile](http://aheckmann.github.com/gm/docs.html#tile)\n    - [transform](http://aheckmann.github.com/gm/docs.html#transform)\n    - [transparent](http://aheckmann.github.com/gm/docs.html#transparent)\n    - [treeDepth](http://aheckmann.github.com/gm/docs.html#treeDepth)\n    - [trim](http://aheckmann.github.com/gm/docs.html#trim)\n    - [type](http://aheckmann.github.com/gm/docs.html#type)\n    - [update](http://aheckmann.github.com/gm/docs.html#update)\n    - [units](http://aheckmann.github.com/gm/docs.html#units)\n    - [unsharp](http://aheckmann.github.com/gm/docs.html#unsharp)\n    - [usePixmap](http://aheckmann.github.com/gm/docs.html#usePixmap)\n    - [view](http://aheckmann.github.com/gm/docs.html#view)\n    - [virtualPixel](http://aheckmann.github.com/gm/docs.html#virtualPixel)\n    - [visual](http://aheckmann.github.com/gm/docs.html#visual)\n    - [watermark](http://aheckmann.github.com/gm/docs.html#watermark)\n    - [wave](http://aheckmann.github.com/gm/docs.html#wave)\n    - [whitePoint](http://aheckmann.github.com/gm/docs.html#whitePoint)\n    - [whiteThreshold](http://aheckmann.github.com/gm/docs.html#whiteThreshold)\n    - [window](http://aheckmann.github.com/gm/docs.html#window)\n    - [windowGroup](http://aheckmann.github.com/gm/docs.html#windowGroup)\n\n  - drawing primitives\n    - [draw](http://aheckmann.github.com/gm/docs.html#draw)\n    - [drawArc](http://aheckmann.github.com/gm/docs.html#drawArc)\n    - [drawBezier](http://aheckmann.github.com/gm/docs.html#drawBezier)\n    - [drawCircle](http://aheckmann.github.com/gm/docs.html#drawCircle)\n    - [drawEllipse](http://aheckmann.github.com/gm/docs.html#drawEllipse)\n    - [drawLine](http://aheckmann.github.com/gm/docs.html#drawLine)\n    - [drawPoint](http://aheckmann.github.com/gm/docs.html#drawPoint)\n    - [drawPolygon](http://aheckmann.github.com/gm/docs.html#drawPolygon)\n    - [drawPolyline](http://aheckmann.github.com/gm/docs.html#drawPolyline)\n    - [drawRectangle](http://aheckmann.github.com/gm/docs.html#drawRectangle)\n    - [drawText](http://aheckmann.github.com/gm/docs.html#drawText)\n    - [fill](http://aheckmann.github.com/gm/docs.html#fill)\n    - [font](http://aheckmann.github.com/gm/docs.html#font)\n    - [fontSize](http://aheckmann.github.com/gm/docs.html#fontSize)\n    - [stroke](http://aheckmann.github.com/gm/docs.html#stroke)\n    - [strokeWidth](http://aheckmann.github.com/gm/docs.html#strokeWidth)\n    - [setDraw](http://aheckmann.github.com/gm/docs.html#setDraw)\n\n  - image output\n    - **write** - writes the processed image data to the specified filename\n    - **stream** - provides a `ReadableStream` with the processed image data\n    - **toBuffer** - returns the image as a `Buffer` instead of a stream\n\n##compare\n\nGraphicsmagicks `compare` command is exposed through `gm.compare()`. This allows us to determine if two images can be considered \"equal\".\n\nCurrently `gm.compare` only accepts file paths.\n\n    gm.compare(path1, path2 [, options], callback)\n\n```js\ngm.compare('/path/to/image1.jpg', '/path/to/another.png', function (err, isEqual, equality, raw, path1, path2) {\n  if (err) return handle(err);\n\n  // if the images were considered equal, `isEqual` will be true, otherwise, false.\n  console.log('The images were equal: %s', isEqual);\n\n  // to see the total equality returned by graphicsmagick we can inspect the `equality` argument.\n  console.log('Actual equality: %d', equality);\n\n  // inspect the raw output\n  console.log(raw);\n\n  // print file paths\n  console.log(path1, path2);\n})\n```\n\nYou may wish to pass a custom tolerance threshold to increase or decrease the default level of `0.4`.\n\n\n```js\ngm.compare('/path/to/image1.jpg', '/path/to/another.png', 1.2, function (err, isEqual) {\n  ...\n})\n```\n\nTo output a diff image, pass a configuration object to define the diff options and tolerance.\n\n\n```js\nvar options = {\n  file: '/path/to/diff.png',\n  highlightColor: 'yellow',\n  tolerance: 0.02\n}\ngm.compare('/path/to/image1.jpg', '/path/to/another.png', options, function (err, isEqual, equality, raw) {\n  ...\n})\n```\n\n##composite\n\nGraphicsMagick supports compositing one image on top of another. This is exposed through `gm.composite()`. Its first argument is an image path with the changes to the base image, and an optional mask image.\n\nCurrently, `gm.composite()` only accepts file paths.\n\n    gm.composite(other [, mask])\n\n```js\ngm('/path/to/image.jpg')\n.composite('/path/to/second_image.jpg')\n.geometry('+100+150')\n.write('/path/to/composite.png', function(err) {\n    if(!err) console.log(\"Written composite image.\");\n});\n```\n\n##montage\n\nGraphicsMagick supports montage for combining images side by side. This is exposed through `gm.montage()`. Its only argument is an image path with the changes to the base image.\n\nCurrently, `gm.montage()` only accepts file paths.\n\n    gm.montage(other)\n\n```js\ngm('/path/to/image.jpg')\n.montage('/path/to/second_image.jpg')\n.geometry('+100+150')\n.write('/path/to/montage.png', function(err) {\n    if(!err) console.log(\"Written montage image.\");\n});\n```\n\n## Contributors\n[https://github.com/aheckmann/gm/contributors](https://github.com/aheckmann/gm/contributors)\n\n## Inspiration\nhttp://github.com/quiiver/magickal-node\n\n## Plugins\n[https://github.com/aheckmann/gm/wiki](https://github.com/aheckmann/gm/wiki)\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010 [Aaron Heckmann](aaron.heckmann+github@gmail.com)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/aheckmann/gm.git"
  },
  "scripts": {
    "test": "make test-unit; make test;"
  },
  "version": "1.23.0"
}