coil-kt / coil

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

Ugly cached vector #188

Closed Pitel closed 4 years ago

Pitel commented 4 years ago

Describe the bug I have a list a with avatars. The avaras are VectorDrawables. When select some avatar and going to edit screen, when the avatar si larger, it's ugly, like resized low-res. I've figured out it's caused by memory caching, because adding memoryCachePolicy(CachePolicy.DISABLED) to each avatar load() fixes the issue. But then, the ViewPager for avatar selection is ineffective, because when swiping to start and back, the avatars are always reloading causing visible pop-ins.

Expected behavior Always sharp VectorDrawables with sane caching.

To Reproduce

  1. Have 2 Fragments, first with tiny (16 dp) ImageView, another with match_parent sized ImageView and some VectorDrawable (maybe this also happens with bitmaps?)
  2. Have some button or something which replaces first fragment with second.
  3. Se ugly "pixelated" vector.

Logs/Screenshots List Detail

Version 0.8.0

colinrtwhite commented 4 years ago

@Pitel Could you try using the latest snapshot and let me know if you still see the issue?

Pitel commented 4 years ago

Looks fixed in 9.0.1. Thanks. :+1:

Pitel commented 4 years ago

Sorry, my bad, still broken in 0.9.1 and 0.10.0-SNAPSHOT. :(

sheckspir commented 4 years ago

reproduced this bug on version 0.9.1. I also tried the version from branch #232 . It was fixed

colinrtwhite commented 4 years ago

@sheckspir Thanks for checking. The fix is now in master and will be released soon as part of 0.9.2.