coil icon indicating copy to clipboard operation
coil copied to clipboard

Visual artefacts when using AsyncImage for small images comparing version 3 and 2 of coil

Open magnub opened this issue 10 months ago • 2 comments

Describe the bug After upgrading from coil 2 to 3 (2.7.0 -> 3.0.4) quite visible artefacts are seen in small images (forced compose view size to 64.dp). Images are loaded with AsyncImage (v2 and v3) composables, is this expected?

To Reproduce Example project here: https://github.com/magnub/Coil23repro.git

Version Coil 2.7.0 and 3.0.4 AsyncImage composables are compared Occurs both in Pixel 9 Pro and emulator

See images below, water in the lighthouse picture has visual artefacts and also several artefacts seen to the right in the "dragon head" picture

Device

Image

Emulator

Image

magnub avatar Jan 24 '25 09:01 magnub

Thanks, looks like this is a side effect of using ImageDecoder for newer API levels in Coil 3. When I force using the old BitmapFactory implementation it's consistent with Coil 2. I'm going to ask the graphics team if there's anything we can do here.

I'm also going to add an option to 3.1 to disable using ImageDecoder here.

colinrtwhite avatar Jan 31 '25 09:01 colinrtwhite

Can confirm that updating my sample to coil 3.1.0 and applying the new ImageLoader.Builder function imageDecoderEnabled(false) resolves the artefacts seen with Coil 3 in the sample app. Without it though same result as previously.

magnub avatar Feb 24 '25 22:02 magnub