Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
magnub opened this issue Jan 24, 2025 · 2 comments

Comments

@magnub
Copy link

magnub commented Jan 24, 2025

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

@colinrtwhite
Copy link
Member

colinrtwhite commented Jan 31, 2025

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.

@magborg5
Copy link

magborg5 commented Feb 17, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants