-
-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic image orientation based on EXIF is broken #733
Comments
I am also experiencing this issue, which is quite crippling for any application that allows users to upload an image from their device and camera. This issue has noting to do with the rotate function (yet). As in the sample code provided by @mkondel, simply loading and writing the image will already deform it. |
I fixed my issue by using another lib called jpeg-autorotate. Please checkout my repo above for a working demo. I use this lib before JIMP to "burn in" the rotation. const fileIn = fs.readFileSync('input.jpg')
const jo = require('jpeg-autorotate')
const {buffer} = await jo.rotate(fileIn, {quality: 30})
const image = await Jimp.read(buffer) |
Not sure why @mkondel closed this, the problem is still present in JIMP 0.6.4 (the latest version as of this comment). Can we get this ticket reopened to get a proper fix, without external workarounds? |
I agree with @grnch : it would be great if this could be fixed in Jimp. I've struggled with this for hours yesterday wondering what I was doing wrong. |
It has been broken by 829b7d2 commit I suppose. In |
The fix is merged 🎉 and was released in v0.8.5 🚀 So can this ticket be closed? |
@oliver-moran I think this is broken again in v0.14.0 (maybe before) |
The same issue with v0.14.0 |
this issue with v0.16.1 |
Any news? |
Still broken in v0.16.1 |
same here with v0.16.1 |
Still broken in 0.16.1. |
Folks. The image rotation is not handled equally by each browser. There are even differences between OS'es for the same browser. It is possible that even with a working JS lib (jimp or other) the EXIF data will get stripped/ignored by the upload. As an example, on windows chrome I have to pre-process all my images locally with a shell script that applies EXIF rotation directly to the files. |
any updates? |
still brocken in "jimp": "0.22.12" |
Expected Behavior
When processing any image, the intended orientation should be preserved.
Current Behavior
In the provided example, a portrait image gets saved in landscape. You can see the black bars that get added on left and right. The core image is oriented correctly inside, but the output file has the wrong dimensions.
Failure Information (for bugs)
Steps to Reproduce
Screenshots
I have screenshots in the repo linked above ^^.
Context
I am using Jimp with excellent result on AWS Lambda. This bug is not related to that at all, as it can be replicated locally.
Failure Logs
The text was updated successfully, but these errors were encountered: