Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug that made height x width to be sometimes inverted when one wa…

…s zero
  • Loading branch information...
commit 6e980092fd98dd218283088afa070917fc28e109 1 parent 72553e2
@thiagoarrais thiagoarrais authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 imagemagick.js
View
6 imagemagick.js
@@ -299,10 +299,10 @@ exports.resizeArgs = function(options) {
args.push('-strip');
}
if (opt.width || opt.height) {
- if (opt.height === 0) opt.height = opt.width;
- else if (opt.width === 0) opt.width = opt.height;
args.push('-resize');
- args.push(String(opt.width)+'x'+String(opt.height));
+ if (opt.height === 0) args.push(String(opt.width));
+ else if (opt.width === 0) args.push('x'+String(opt.height));
+ else args.push(String(opt.width)+'x'+String(opt.height));
}
opt.format = opt.format.toLowerCase();
var isJPEG = (opt.format === 'jpg' || opt.format === 'jpeg');
Please sign in to comment.
Something went wrong with that request. Please try again.