diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt index fe7c7f9e5..08d7002b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt @@ -28,9 +28,12 @@ class GlideDecoder : ImageDecoder { .signature(uri.path.getFileSignature()) .format(DecodeFormat.PREFER_ARGB_8888) .diskCacheStrategy(DiskCacheStrategy.RESOURCE) - .transform(GlideRotateTransformation(context, getRotationDegrees(orientation))) .override(targetWidth, targetHeight) + val degrees = getRotationDegrees(orientation) + if (degrees != 0f) + options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation))) + val drawable = Glide.with(context) .load(uri) .apply(options)