Add "_subCommand" param.

Use to select the graphicsMagick sub-command needed.
master
Math- 12 years ago
parent 50e288ecfc
commit 629c80e7c1
  1. 1
      index.js
  2. 8
      lib/args.js
  3. 2
      lib/command.js

@ -28,6 +28,7 @@ function gm (source, height, color) {
this._in = [];
this._out = [];
this._outputFormat = null;
this._subCommand = 'convert';
if (source instanceof Stream) {
this.sourceStream = source;

@ -11,7 +11,13 @@ 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){
this._subCommand = name;
return this;
}
// http://www.graphicsmagick.org/GraphicsMagick.html#details-adjoin
proto.adjoin = function adjoin () {
return this.out("-adjoin");

@ -239,7 +239,7 @@ module.exports = function (proto) {
if (this._outputFormat) outname = this._outputFormat + ':' + outname;
return [].concat(
'convert'
this._subCommand
, this._in
, source
, this._out

Loading…
Cancel
Save