-
Notifications
You must be signed in to change notification settings - Fork 604
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
fix(camera): Reset exif orientation if corrected #510
Conversation
Hi! This fix will fail on some Xiaomis devices (maybe others). String imageUri.getPath() can't be opened by ExifInterface
You could try to use and inputStream (like on method getOrientation()) but then you can't save the file
|
I am getting the same error on my Pixel 3a when selecting a portrait image from the gallery.
(btw it would probably the best if capacitor-plugins/camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java Lines 352 to 355 in 0292dab
It happens because imageUri contains a content provider URI and not a regular file uri. Also, even if it would work, rewriting the exif data on the picture from the gallery is probably not a good idea because then the image in the gallery would contain the wrong exif data. |
@WIStudent : I was also getting the same error on a Samsung Galaxy S10 when trying to upload a photo from the gallery. Downgrading the plugin to |
If
getPhoto
is called withcorrectOrientation: true
and the photo gets the orientation corrected, reset the exif orientation too.closes #503