Skip to content

Commit

Permalink
StaticImageDecoder ignores partial image by default
Browse files Browse the repository at this point in the history
to match BitmapFactoryDecoder behaviour
  • Loading branch information
revonateB0T authored Nov 16, 2024
1 parent cd6dc84 commit 03c86a5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ class StaticImageDecoder(
// Configure any other attributes.
configureImageDecoderProperties()
}
return@withPermit DecodeResult(
DecodeResult(
image = bitmap.asImage(),
isSampled = isSampled,
)
}
}

private fun ImageDecoder.configureImageDecoderProperties() {
onPartialImageListener = ImageDecoder.OnPartialImageListener { true }
allocator = if (options.bitmapConfig.isHardware) {
ImageDecoder.ALLOCATOR_HARDWARE
} else {
Expand Down

0 comments on commit 03c86a5

Please sign in to comment.