Merge pull request #2615 from KryptKode/fix/horizontal_flipped_images

fix wrong rotation for horizontally flipped images
This commit is contained in:
Tibor Kaputa 2022-09-20 08:35:05 +02:00 committed by GitHub
commit e1a45f15e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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
}