coil-kt / coil

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

Pixelated RoundedCornersTransformation #837

Closed s4cha closed 3 years ago

s4cha commented 3 years ago

Hello there We recently migrated from fresco to Coil and we are facing an issue using RoundedCornersTransformation which yields a pixelated image.

Any idea where this would come from?

code

imageView.load(item.uri.toString()) {
    crossfade(true)
    transformations(RoundedCornersTransformation(8.dp.px.toFloat()))
}

library used is io.coil-kt:coil-compose:1.3.0 Screenshot_20210802_113803_com octopepper yummypets

Screenshot 2021-08-02 at 11 41 31
colinrtwhite commented 3 years ago

If they're small images it's possible they're getting scaled up. Try adding precision(Precision.EXACT) to your request.

s4cha commented 3 years ago

Worked like a charm, thank you 👍