You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
When using IMvxPictureChooserTask.ChoosePictureFromLibrary() on Android, the method GetRealPathFromUri is returning null, causing a Java.Lang.IllegalArgumentException from the Android.Media.ExifInterface constructor in ExifRotateBitmap. This is handled by the try/catch block in LoadScaledBitmap, but returns the image without applying the correct rotation (e.g. for photos taken by devices that set Exif orientation rather than rotating the image).
Tested on Samsung Galaxy Note 5 running Lollipop. Also saw the exception on Nexus 5X running Marshmallow (but this camera rotates the image rather than setting Exif so no visible issue for user).
The text was updated successfully, but these errors were encountered:
i am getting the following stack trace :
Problem seem in Exit Rotate IllegalArgumentException: filename cannot be null
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00084] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1029
at Android.Runtime.JNIEnv.FinishCreateInstance (IntPtr instance, IntPtr jclass, IntPtr constructorId, Android.Runtime.JValue* constructorParameters) [0x0000b] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:306
at Android.Media.ExifInterface..ctor (System.String filename) [0x000cc] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Media.ExifInterface.cs:154
at MvvmCross.Plugins.PictureChooser.Droid.MvxPictureChooserTask.ExifRotateBitmap (Android.Content.ContentResolver contentResolver, Android.Net.Uri uri, Android.Graphics.Bitmap bitmap) [0x0000d] in :0
at MvvmCross.Plugins.PictureChooser.Droid.MvxPictureChooserTask.LoadScaledBitmap (Android.Net.Uri uri) [0x00073] in :0
--- End of managed exception stack trace ---
When using IMvxPictureChooserTask.ChoosePictureFromLibrary() on Android, the method GetRealPathFromUri is returning null, causing a Java.Lang.IllegalArgumentException from the Android.Media.ExifInterface constructor in ExifRotateBitmap. This is handled by the try/catch block in LoadScaledBitmap, but returns the image without applying the correct rotation (e.g. for photos taken by devices that set Exif orientation rather than rotating the image).
Tested on Samsung Galaxy Note 5 running Lollipop. Also saw the exception on Nexus 5X running Marshmallow (but this camera rotates the image rather than setting Exif so no visible issue for user).
The text was updated successfully, but these errors were encountered: