Permalink
Browse files

fixed; magnify support

  • Loading branch information...
1 parent cd37427 commit fc5e5338fc6dba4c5c77d9188029ba2a97838371 @aheckmann committed Dec 14, 2012
Showing with 16 additions and 7 deletions.
  1. +2 −2 lib/args.js
  2. +14 −5 test/magnify.js
View
@@ -754,9 +754,9 @@ module.exports = function (proto) {
return this.out("-crop", w+"x"+h + "+"+(x||0)+"+"+(y||0));
}
- // http://www.graphicsmagick.org/GraphicsMagick.html
+ // http://www.graphicsmagick.org/GraphicsMagick.html#details-magnify
proto.magnify = function magnify (factor) {
- return this.in("-magnify", factor || 1);
+ return this.in("-magnify");
}
// http://www.graphicsmagick.org/GraphicsMagick.html
View
@@ -1,11 +1,20 @@
-// gm - Copyright Aaron Heckmann <aaron.heckmann+github@gmail.com> (MIT Licensed)
+var assert = require('assert')
-module.exports = function (gm, dir, finish) {
- return finish();
+module.exports = function (gm, dir, finish, GM) {
- gm
- .magnify()
+ var m = gm
+ .magnify();
+
+ var args = m.args();
+ assert.equal('convert', args[0]);
+ assert.equal('-magnify', args[1]);
+ assert.equal(4, args.length);
+
+ if (!GM.integration)
+ return finish();
+
+ m
.write(dir + '/magnify.png', function magnify (err) {
finish(err);
});

0 comments on commit fc5e533

Please sign in to comment.