From 6bf0e8c82d6e12f7c2098e040f204f665b7594d5 Mon Sep 17 00:00:00 2001 From: Aaron Heckmann Date: Fri, 14 Dec 2012 09:04:40 -0800 Subject: [PATCH] fixed; remove -size arg from extent closes #103 --- lib/args.js | 5 ----- test/extent.js | 10 ++++------ test/gravity.js | 4 +--- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/args.js b/lib/args.js index c77817d..8b80e8d 100644 --- a/lib/args.js +++ b/lib/args.js @@ -1000,11 +1000,6 @@ module.exports = function (proto) { geometry = 'x' + h + options } - // avoid error "geometry does not contain image (unable to crop image)" - gh-17 - if (!(this.inputIs('jpg') && ~this._out.indexOf('-crop'))) { - this.in("-size", geometry); - } - return this.out("-extent", geometry); } diff --git a/test/extent.js b/test/extent.js index b2131d1..70ef12a 100644 --- a/test/extent.js +++ b/test/extent.js @@ -8,12 +8,10 @@ module.exports = function (gm, dir, finish, GM) { var args = m.args(); assert.equal('convert', args[0]); - assert.equal('-size', args[1]); - assert.equal('300x300', args[2]); - assert.equal('-scale', args[4]); - assert.equal('200x100', args[5]); - assert.equal('-extent', args[6]); - assert.equal('300x300', args[7]); + assert.equal('-scale', args[2]); + assert.equal('200x100', args[3]); + assert.equal('-extent', args[4]); + assert.equal('300x300', args[5]); if (!GM.integration) return finish(); diff --git a/test/gravity.js b/test/gravity.js index 2bbda41..89515d8 100644 --- a/test/gravity.js +++ b/test/gravity.js @@ -11,9 +11,7 @@ module.exports = function (img, dir, finish, gm) { var args = m.args(); assert.equal('convert', args[0]); - assert.equal('-size', args[1]); - assert.equal('300x300', args[2]); - args= args.slice(4); + args= args.slice(2); assert.deepEqual(args, [ '-scale', '200x100',