From 13e08935ee8e4b986f9f50caf6c0c3fbbfe5df0c Mon Sep 17 00:00:00 2001 From: darthpaul Date: Tue, 20 Sep 2022 02:10:40 +0100 Subject: [PATCH] fix wrong rotation for horizontally flipped images --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 778a3bbbd..d2577d856 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -22,6 +22,7 @@ import android.widget.RelativeLayout import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_180 import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_270 import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_90 +import androidx.exifinterface.media.ExifInterface.ORIENTATION_TRANSVERSE import androidx.exifinterface.media.ExifInterface.TAG_ORIENTATION import com.alexvasilkov.gestures.GestureController import com.alexvasilkov.gestures.State @@ -343,7 +344,7 @@ class PhotoFragment : ViewPagerFragment() { private fun degreesForRotation(orientation: Int) = when (orientation) { ORIENTATION_ROTATE_270 -> 270 ORIENTATION_ROTATE_180 -> 180 - ORIENTATION_ROTATE_90 -> 90 + ORIENTATION_ROTATE_90, ORIENTATION_TRANSVERSE -> 90 else -> 0 }