Skip to content

Node.js based forum software built for the modern web

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

manolino9cb098bb0bd3
diff --git a/src/image.js b/src/image.js
index 9377757cf3..4d3be47e6f 100644
--- a/src/image.js
+++ b/src/image.js
@@ -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;