-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add feature to set exif orientation #15
Comments
Hi @TonyBrobston , Thank you for this awesome proposal! I'm going to upgrade dep packages. Please merge or rebase and please go ahead. |
@ginpei It looks like there aren't any conflicts. I took an initial stab at passing the test since I had a few minutes to spare. I need to refactor as I have code duplication and I also need to implement Thankfully all the coding you've already done did all the heavy lifting. I also need to figure out what to do when I'm also wondering what will happen if I try to set orientation on an image that doesn't have orientation. Seems the way I've passed the current test will work, for updating an image that has orientation already, but may it probably won't work for an image that doesn't; I'll write another test over that. |
For an image without orientation data, I suppose we don't have to support it and throw a not support error instead. There are another options to deal with JPEG/Exif things with many features. I would rather keep mine simple one. |
I would also like to propose changing to |
I went ahead and converted to |
Released in v1.1.0 https://www.npmjs.com/package/@ginpei/exif-orientation/v/1.1.0 Thank you @TonyBrobston ! |
Hey @ginpei ,
I'm considering implementing this package into my client side image compression package (https://www.npmjs.com/package/jpegasus).
I wrote up some logic to read the orientation, then I use that orientation to determine which context transform to do, to flip/rotate an image to orientation 1. However I have no way to set the orientation to 1 after the flip/rotate.
Would you be interested in adding functionality to your package to be able to update the orientation on a
File
? If so, I'll ditch my logic for reading orientation and implement yours, then also use the feature to update the orientation.It looks like Chrome and Firefox have added a feature where they will correct the orientation when an image is displayed in the browser. So for example if the orientation is 6, it will display in the browser as orientation 1. This creates a bug with my image compression package, so I may flip/rotate an image of orientation 6 to orientation 1; but if I don't update the orientation to 1 in that case, then Chrome/Firefox still assume the image is in orientation 6 and so Chrome/Firefox will do another flip/rotate. If that's not enough info, here's the issue on my package that I'm working on: TonyBrobston/jpegasus#151
I could potentially collaborate on the coding also. Let me know what you think.
Thanks,
Tony
The text was updated successfully, but these errors were encountered: