XF Image taken from iPhone shows rotated on Android device - MediaPlugin

Issue in MediaPlugin for Xamarin Forms

Steps to reproduce the Behaviour

Take Photo from IPhone camera and save binary in DB
If you open same binary in Image View on Iphone, it shows correct image
But If you open same image binary in Android device, it shows left side rotated image
**
Expected Behavior**
Image should show without rotation.

Actual Behavior
Image shows rotated on android device

Code snippet

var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
                    {
                        SaveToAlbum = false,
                        CompressionQuality = 90,
                        PhotoSize = PhotoSize.Medium,
                        RotateImage = false,
                    });

If I try to read EXIF, it gives TopRight. It should be TopLeft

using (var stream = file.GetStream())
                {
                    var photoinfo = ExifLib.ExifReader.ReadJpeg(stream);
                    ExifLib.ExifOrientation orientation = photoinfo.Orientation;
                }

Is there a way I can update, EXIF for this image file.

Sign In or Register to comment.