Implements Jimp exitRotate() new method (jimp 0.2.28) to sove incoherent rotations when scaling images.

This commit is contained in:
manolino
2017-08-28 14:34:42 -04:00
committed by Julian Lam
parent bc6edba6df
commit 9cb098bb0b

View File

@@ -37,6 +37,10 @@ image.resizeImage = function (data, callback) {
var y = 0;
var crop;
if (image._exif && image._exif.tags && image._exif.tags.Orientation) {
image.exifRotate();
}
if (origRatio !== desiredRatio) {
if (desiredRatio > origRatio) {
desiredRatio = 1 / desiredRatio;