Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 7a7e8ce

Browse files
committed
[[ Bug 22763 ]] Ensure the captured image is not rotated when saved
This patch ensures that the captured image returned by mobilePickPhoto is not rotated. This is achieved by closing the (now finished) original stream, and then creating a new one.
1 parent e9aa1b6 commit 7a7e8ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

engine/src/java/com/runrev/android/Engine.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2234,10 +2234,12 @@ else if (resultCode == Activity.RESULT_OK)
22342234

22352235
/* In API Level >= 24, you have to use an input stream to make sure that access
22362236
* to a photo in the library is granted. Before that you can just open the photo's
2237-
* file direct. */
2237+
* file directly. */
22382238
ExifInterface t_exif;
22392239
if (Build.VERSION.SDK_INT >= 24)
22402240
{
2241+
t_in.close();
2242+
t_in = ((LiveCodeActivity)getContext()).getContentResolver().openInputStream(t_photo_uri);
22412243
t_exif = new ExifInterface(t_in);
22422244
}
22432245
else

0 commit comments

Comments
 (0)