mirror of https://gitgud.io/fatchan/gm
parent
3b819534d5
commit
cc0afa4f6e
3 changed files with 60 additions and 1 deletions
@ -0,0 +1,6 @@ |
||||
|
||||
// gm - Copyright Aaron Heckmann <aaron.heckmann+github@gmail.com> (MIT Licensed)
|
||||
|
||||
module.exports = exports = function (proto) { |
||||
proto._options = {}; |
||||
} |
@ -0,0 +1,26 @@ |
||||
|
||||
// gm - Copyright Aaron Heckmann <aaron.heckmann+github@gmail.com> (MIT Licensed)
|
||||
|
||||
|
||||
var assert = require('assert') |
||||
|
||||
module.exports = function (_, dir, finish, gm) { |
||||
|
||||
assert.equal('gm', gm('test').constructor.name); |
||||
assert.equal(undefined, gm.prototype._options.imageMagick); |
||||
|
||||
var sub = gm.subClass({ imageMagick: true }); |
||||
|
||||
assert.equal('gm', sub('test').constructor.name); |
||||
assert.equal(true, sub.prototype._options.imageMagick); |
||||
|
||||
var s = sub('test'); |
||||
assert.equal(true, s._options.imageMagick); |
||||
assert.equal(undefined, gm.prototype._options.imageMagick); |
||||
|
||||
gm(dir + '/photo.JPG') |
||||
.thumb(50, 80, dir + '/SUBthumb.png', function subthumb (err) { |
||||
if (err) return finish(err); |
||||
finish(); |
||||
}); |
||||
} |
Loading…
Reference in new issue