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

This commit is contained in:
manolino
2017-08-21 15:54:25 -06:00
parent 4dc23c4dfe
commit 59e1731a27

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;