coil-kt / coil

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

`Image.toBitmap()` doesn't support hardware bitmaps #2644

Closed dandc87 closed 2 weeks ago

dandc87 commented 2 weeks ago

Describe the bug Image.toBitmap() can throw java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps

To Reproduce

It's not reusing the underlying Bitmap because toImage() check if the config is ARGB_8888. I would expect the no-arg toImage() to return whatever underlying Bitmap exists

Version Coil 3.0.0

colinrtwhite commented 2 weeks ago

Great catch! Fixed here and will ship in 3.0.1.