Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>