-
Notifications
You must be signed in to change notification settings - Fork 43
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
Incorrect image transformation for few EXIF orientations #34
Comments
After some research, I found that the problem is more complex than few incorrect transformations. Presented data are invalid and should be ignored. I'll close referenced PR that doesn't fixes problem. |
Thanks @davpsh -- if you have sample images that you can share, I can help troubleshoot this |
Maybe the images published below are useful. https://github.com/recurser/exif-orientation-examples In my test, 2-8 seems to give wrong results. |
I fixed it here otaviosoares@31c6a93 It's a very poor implementation tho. I wanted to open a PR but I didn't have the time. |
Is there any progress? Or should I fork it? |
Will take a look at these, just bumped the library to the latest ExifReader so I'm wondering if the old one had some idiosyncracies. |
@davpsh Looks like it may have been the older version of ExifReader we were using. I see the autoRotate transformations working (used your samples above): 90 CW270 CWIf you grab the latest from NPM (v2.3.0) it should reflect these changes. lmk if you continue to see any issues, thanks! |
Correction, latest is v2.3.2 |
Update: It appears we may not need ExifReader anymore, all browsers should now auto rotate images based on their EXIF. Will be testing a branch without ExifReader so we can really pare down the size of this library https://aws.amazon.com/blogs/machine-learning/how-an-important-change-in-web-standards-impacts-your-image-annotation-jobs/ The above was "fixed" because orientation from ExifReader would never resolve (it's now promise-y when you directly load a file) and it would never pass in the orientation value. And because my browser automatically rotates based on EXIF above, it should always resolve. TL;DR: It appears web standards have saved us, we may not need ExifReader anymore. |
- See https://aws.amazon.com/blogs/machine-learning/how-an-important-change-in-web-standards-impacts-your-image-annotation-jobs/ - Browsers now rotate images based on exif by default
* #34 removes ExifReader - See https://aws.amazon.com/blogs/machine-learning/how-an-important-change-in-web-standards-impacts-your-image-annotation-jobs/ - Browsers now rotate images based on exif by default * readme.md update * updated dist for next release Co-authored-by: Eric "Danger" Nograles <[email protected]>
Tested across all browsers, all engines autoRotate by default, |
The problem is reproduced on any version of the module.
I tested auto-rotation using an image with all possible EXIF orientations and found that some of them are not handled (transformed) correctly.
Here is a list of EXIF orientations from my tests with handle results and original image without EXIF orientation:
The text was updated successfully, but these errors were encountered: