https://kotlinlang.org logo
m

Mikael Alfredsson

06/06/2020, 5:07 PM
Does compose give you a way to de-saturate an image? The ImageView can use ColorMatrices as color filters (and the ColorMatrix class even has a helper method for
setSaturation
but I can’t find any similar function for Composable Images? (I’m very new to Compose so I can easily have missed something)
n

nickbutcher

06/07/2020, 2:16 PM
Will let @Nader Jawad comment on thoughts of exposing this functionality but you do still have the
drawCanvas
escape hatch to get a platform
Canvas
and do this. e.g. https://github.com/chrisbanes/accompanist/blob/master/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt#L344
👍 1
3 Views