use RGB_565 when decoding bounds at fullscreen media

This commit is contained in:
tibbi 2018-09-05 16:26:28 +02:00
parent bdf13a569e
commit d14151dbe3

View File

@ -19,7 +19,7 @@ class PicassoRegionDecoder : ImageRegionDecoder {
synchronized(decoderLock) { synchronized(decoderLock) {
val options = BitmapFactory.Options() val options = BitmapFactory.Options()
options.inSampleSize = sampleSize options.inSampleSize = sampleSize
options.inPreferredConfig = Bitmap.Config.ARGB_8888 options.inPreferredConfig = Bitmap.Config.RGB_565
val bitmap = decoder!!.decodeRegion(rect, options) val bitmap = decoder!!.decodeRegion(rect, options)
return bitmap ?: throw RuntimeException("Region decoder returned null bitmap - image format may not be supported") return bitmap ?: throw RuntimeException("Region decoder returned null bitmap - image format may not be supported")
} }