mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
Implements Jimp exitRotate() new method (jimp 0.2.28) to sove incoherent rotations when scaling images.
This commit is contained in:
@@ -37,6 +37,10 @@ image.resizeImage = function (data, callback) {
|
|||||||
var y = 0;
|
var y = 0;
|
||||||
var crop;
|
var crop;
|
||||||
|
|
||||||
|
if (image._exif && image._exif.tags && image._exif.tags.Orientation) {
|
||||||
|
image.exifRotate();
|
||||||
|
}
|
||||||
|
|
||||||
if (origRatio !== desiredRatio) {
|
if (origRatio !== desiredRatio) {
|
||||||
if (desiredRatio > origRatio) {
|
if (desiredRatio > origRatio) {
|
||||||
desiredRatio = 1 / desiredRatio;
|
desiredRatio = 1 / desiredRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user