-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Orientation fix vs Image Exif #1967
Comments
I just ran into the same issue and decided to find a solution. The issue is indeed that the Exif information is restored the way it was on the original image. However, the parameter fixOrientation doesn't help here. What happens is this:
The possible solutions I could think of are are: I didn't like a) because one looses the exif information completely. I didn't know how to do b). So implemented c). Edit: |
Any chance the fix for this will be applied to master, or any of the new releases? |
This is breaking our photo uploads, when will this get fixed? We use the resizeWidth-option to reduce the upload size. But the images now get rotated multiple times (by dropzone before upload, and by our code before showing on website), because the EXIF information still reflects the original orientation before the image got rotated. I can supply testing images if necessary. |
Hello everyone, The PR by @kaymes has been merged in the maintained fork ( |
As a temporary fix one may replace the transformFile function with a resizeImage version that does not restore EXIF data:
|
.... or you can use the maintained fork that includes a fix ;) |
We have been working on photo upload and orientation vs auto-resizing.
We have been having problems with photo upload and I just wanted to check few things with you dropzone team.
Code seems to have "fixOrientation" that is always set as true (guess this was not supposed to be set via options?). That seems to read EXIF if possible (via library) and auto-rotate the image if needed.
Questions/Concerns
When an image is auto-rotated (and even more so, resized too), is this new rotation information also saved/updated with the new EXIF (if any beforehand?)
if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') { // Now add the original EXIF information resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL); }
I may be wrong but that code seemingly just restores the original EXIF info without taking the automatic file rotational changes into consideration?
While not totally related to above question I have noticed that an online search also seems to point that line to be culprit to many orientation problems on thumb display. I may open feature request to have callback support so that we can override the URL via returned data on server.
If this orientation/exif feature-set is not complete, are there any interim plans to have option to "ignore orientation work (exif or otherwise)" and do resize/upload without that meta?
I happen to be mainly a backend developer I have not had time to fully check this but will dig further soon.
Thanks!
The text was updated successfully, but these errors were encountered: