Skip to content
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

Some images are fetched in wrong orientation #7

Open
domax opened this issue Dec 13, 2016 · 10 comments
Open

Some images are fetched in wrong orientation #7

domax opened this issue Dec 13, 2016 · 10 comments
Assignees

Comments

@domax
Copy link
Owner

domax commented Dec 13, 2016

iOS version should take into account imageOrientation property for correct image orientation.

@domax domax added this to the 1.0.5 milestone Dec 13, 2016
@domax domax self-assigned this Dec 13, 2016
@domax domax modified the milestones: 1.0.5, 1.0.6, 1.0.7 Dec 27, 2016
@domax domax modified the milestones: 1.0.7, 1.0.8 Feb 5, 2017
@domax domax modified the milestone: 1.0.8 Mar 4, 2017
@victoria168
Copy link

Hi, any updates on this issue? Some of my images are fetched in wrong direction too.

@domax
Copy link
Owner Author

domax commented Nov 9, 2017

@victoria168 : Unfortunately I've lost all my images with wrong orientation :(. I would be very grateful for steps how to make such photos.

@victoria168
Copy link

@domax Do you mean how to repeat the step of displaying wrong direction? My step is: call photo() to get all meta data of photos -> call thumbnail() and display in small grid (orientation ok) -> call image() to get raw photo and display it (pictures taken by camera are displayed in wrong orientation). I'm using iPhong6 IOS 10.3.3 for testing.

@domax
Copy link
Owner Author

domax commented Nov 10, 2017

@victoria168 No )) - I know how to get existing images from device (since it's me who wrote this plugin).
I mean steps how to take (shoot) photos in a way that they will have wrong orientation. I had such photos in my iPhone - I just discovered that they are fetched from device in wrong orientation. But I have no idea why they have it wrong, and how it was happen.
I've lost all such photos, so I have to make them again to fix this issue.

@victoria168
Copy link

Hi, do you encounter this issue in Android? I find in Android album a property called 'Orientation'. Without it all images get from Photos.photos() are in wrong orientation. Is it possible to add this property to your plugin? Thanks.
Android version: 6.0.1

@domax
Copy link
Owner Author

domax commented Dec 27, 2017

@victoria168 : sure it's possible. Though, I never observed the wrong orientations on my Android devices yet.
I have no device with 6th Android - I'll try to reproduce it in emulator, but I cannot provide any estimations for now, unfortunately.

@victoria168
Copy link

@domax thanks so much. Have you added orientation params yet? Please let me know so that I can test in my Android v6 device.

@bea545lisa
Copy link

@domax on Android image orientation is yet not included and some photos therefore have wrong orientation. Isn't it possible to add orientation parameter? Thanks.

@loshonja
Copy link
Contributor

Hi, this issue still persists on Android. Here is my conclusion why this problem appears and my solution.

Some Camera apps store captured images with the original orientation (as they were taken). Plugin is fine with it.

Camera apps on some Android devices store images always in landscape (orientation 0), but with appropriate orientation info stored as additional exif metadata. Plugin currently is not taking that information in consideration and always returns landscape images as both thumbnails and images.

Firstly, I decided to find another plugin that handles this problem, but encountered a lot of different problems with them so after few days I found that the best solution is to use this plugin with few changes I made within in:

  • photos() gets orientation info from Android MediaStore.Images
  • thumbnail() rotates bitmap following the orientation info before returning it
  • image() rotates bitmap following the orientation info before returning it

@domax
Copy link
Owner Author

domax commented Oct 9, 2019

@loshonja - please send pull request with your fix, if you don't mind. Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants