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 d094d4ba6..84da27361 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 @@ -665,7 +665,7 @@ class PhotoFragment : ViewPagerFragment() { } val regionDecoder = object : DecoderFactory { - override fun make() = PicassoRegionDecoder(showHighestQuality, mScreenWidth, mScreenHeight, minTileDpi, mMedium.isHeic()) + override fun make() = PicassoRegionDecoder(showHighestQuality, mScreenWidth, mScreenHeight, minTileDpi) } var newOrientation = (rotation + mCurrentRotationDegrees) % 360 diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/PicassoRegionDecoder.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/PicassoRegionDecoder.kt index b3133327d..35a7c6cfc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/PicassoRegionDecoder.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/PicassoRegionDecoder.kt @@ -9,8 +9,7 @@ class PicassoRegionDecoder( val showHighestQuality: Boolean, val screenWidth: Int, val screenHeight: Int, - val minTileDpi: Int, - val isHeic: Boolean + val minTileDpi: Int ) : ImageRegionDecoder { private var decoder: BitmapRegionDecoder? = null private val decoderLock = Any() @@ -35,7 +34,7 @@ class PicassoRegionDecoder( val options = BitmapFactory.Options() options.inSampleSize = newSampleSize - options.inPreferredConfig = if (showHighestQuality || isHeic) Bitmap.Config.ARGB_8888 else Bitmap.Config.RGB_565 + options.inPreferredConfig = Bitmap.Config.ARGB_8888 val bitmap = decoder!!.decodeRegion(rect, options) return bitmap ?: throw RuntimeException("Region decoder returned null bitmap - image format may not be supported") }