coil-kt / coil

Image loading for Android and Compose Multiplatform.
https://coil-kt.github.io/coil/
Apache License 2.0
10.68k stars 647 forks source link

Green overlay on images with AVIF format #2419

Closed iroyo closed 1 month ago

iroyo commented 1 month ago

Describe the bug Green line (vertical or horizontal) in some images when using AVIF format (above 31). Example of "Accept" header used: "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*"

To Reproduce Sample project here coiling-avif Steps:

Example of cURL (we can output that into an image to see the visual artifact is NOT present)

curl 'https://shop.mango.com/assets/rcs/pics/static/T7/fotos/S/77004767_40_D7.jpg?ts=1722591772050&imdensity=1&imwidth=538' \
  -H 'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*' \
  -H 'accept-encoding: gzip' \
  -H 'connection: Keep-Alive' \
  -H 'host: shop.mango.com' \
  -H 'user-agent: okhttp/4.12.0' \

Logs/Screenshots

Captura de pantalla 2024-08-06 a las 15 14 51

Version

This has been observed only in some devices and in some images. Example devices:

colinrtwhite commented 1 month ago

@iroyo Thanks for the repro project. Does this still occur if you update to Coil 3.0.0-alpha09? It updates to use the new ImageDecoder API. If it still occurs does it occur if you decode the image directly with ImageDecoder?

iroyo commented 1 month ago

Hey Colin thanks for the fast response,

Sadly, after bumping up the coil version I still experience this visual artifact in the image when using AVIF I have updated the repo linked above

Let me know if there anything that I could try, or something that I could investigate

colinrtwhite commented 1 month ago

@iroyo if you decode the image directly with ImageDecoder (no Coil) does it also show the green line?

iroyo commented 1 month ago
Captura de pantalla 2024-08-08 a las 15 01 37

Sadly, I think I've come to a dead end... ImageDecoder versions seem to have the same issue.. this implies its an Android problem right? ΒΏ Because I see no green line when I open the file in my computer

colinrtwhite commented 1 month ago

Yep unfortunately this is likely an Android platform issue. Can you file an issue with the Android graphics team please? If they say there's a reasonable work-around to add to Coil we can do that.

colinrtwhite commented 1 month ago

Closing as this is a platform issue with Android's decoders please file an issue with the graphics team.