docs; make gm().command() public

master
Jonathan Ong 11 years ago
parent 3750d5d331
commit 1a2757949a
  1. 7
      README.md
  2. 2
      lib/args.js

@ -164,12 +164,13 @@ gm('img.jpg')
If `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.
- `gm().command()` - Custom command such as `identify` or `convert`
- `gm().in()` - Custom input arguments
- `gm().out()` - Custom output arguments
The command will be formatted in the following order:
1. `command` - ie `gm convert` or `convert`
1. `command` - ie `convert`
2. `in` - the input arguments
3. `source` - stdin or an image file
4. `out` - the output arguments
@ -215,6 +216,10 @@ First download and install [GraphicsMagick](http://www.graphicsmagick.org/) or [
brew install imagemagick
brew install graphicsmagick
If you want WebP support with ImageMagick, you must add the WebP option:
brew install imagemagick --with-webp
then either use npm:
npm install gm

@ -12,7 +12,7 @@ var argsToArray = require('./utils').argsToArray;
module.exports = function (proto) {
// define the sub-command to use, http://www.graphicsmagick.org/utilities.html
proto.subCommand = function subCommand (name){
proto.command = proto.subCommand = function subCommand (name){
this._subCommand = name;
return this;
}

Loading…
Cancel
Save