dimonovdd / Xamarin.MediaGallery

This plugin is designed to picking and save images and video files from native gallery of Android and iOS devices and capture photos
MIT License
149 stars 18 forks source link

[iOS] Image picker returns incorrect onrientation, when image was not taken holding phone "90 deg left" #99

Closed rr-rv closed 2 years ago

rr-rv commented 2 years ago

Description

iOS stores images in non rotated and save the rotation compared to the camera in exif data i believe. When picking with the ImagePicker iOS handles the rotation in the image previews. This is not taking into consideration when the lib delivers the images picked from gallery.

This seams to be a problem with all multi image pickers for xamarin.forms out there. But serval people hinted that this one didn't have it, so here is a bug report.

if I'm using the lib. wrong or this is expected behaviour, then don't hesitate to close this again. im trying to let a user pick some images and the phone uploads them to a server where they are used later.

Actual Behavior

After picking images in gallery and gotten the image with *.OpenReadAsync() they show as if they where all taken with the phone held at "90 deg. left"

Expected behavior

*.OpenReadAsync() returns a image with the expected orientation.

Steps to reproduce the behavior

take images holding the phone ex. upright or 90 deg right. use MediaGallery.PickAsync to get them use OpenReadAsync() to get bytes/stream display image on screen.

Screenshots or Videos

2-edit 3-edit

Reproduction Link

Configuration

dimonovdd commented 2 years ago

Hi. Yes, this plugin does not convert images in any way. But it adds missing data containing orientation information

rr-rv commented 2 years ago

alright. thats on me. so the info is in the stream. thanks mate for the quick response.