I need to change Bitmap? or BitmapDrawable to ImageBitmap and show it with coil
here is my code
val bitmap = BlurhashDecoder.decode(blurhash, 4, 3)
Image(
bitmap = bitmap as ImageBitmap,
modifier = modifier,
contentScale = ContentScale.Crop,
contentDescription = ""
)
when I run it I get this error
java.lang.ClassCastException: android.graphics.Bitmap cannot be cast to androidx.compose.ui.graphics.ImageBitmap
use bitmap.asImageBitmap() to convert a bitmap to ImageBitmap
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With