Skip to content

Commit

Permalink
Added custom crop options
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkow committed Sep 25, 2011
1 parent d855acf commit 455fb1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions imagemagick.js
Expand Up @@ -302,8 +302,8 @@ exports.crop = function (options, callback) {
resizeTo = (dSrc < dDst) ? ''+t.opt.width+'x' : 'x'+t.opt.height;
args = args.concat([
'-resize', resizeTo,
'-gravity', 'Center',
'-crop', ''+t.opt.width + 'x' + t.opt.height + '+0+0',
'-gravity', t.opt.gravity,
'-crop', ''+t.opt.width + 'x' + t.opt.height + '+' + t.opt.top + '+' + t.opt.left,
'+repage'
]);
ignoreArg = false;
Expand All @@ -327,6 +327,9 @@ exports.resizeArgs = function(options) {
colorspace: null,
width: 0,
height: 0,
gravity: 'NorthWest',
top: 0,
left: 0,
strip: true,
filter: 'Lagrange',
sharpening: 0.2,
Expand Down

0 comments on commit 455fb1d

Please sign in to comment.