Open zkvvoob opened 1 year ago
This is because you are loading bitmap in GPU, this has its own benefits like performance as each pixel will be stored independently. Since drawToBitmap()
androidx utility needs these pixel data it has to be present in memory.
If you are loading an image in Glide, you can use disallowHardwareConfig()
to load bitmaps in memory. I don't have any idea about coil if you are using so but I'm sure coil docs must have a mention for that.
Use coil's ImageRequest.allowHardware(false) method to solve the problem of java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps
AsyncImage(
model = ImageRequest.Builder(LocalContext.current)
.data("https://xxxx.png")
.allowHardware(false)
.crossfade(true)
.build(),
contentDescription = null,
modifier = Modifier
.size(200.dp)
.clip(RoundedCornerShape(12.dp)),
contentScale = ContentScale.Crop
)
Hello,
I realise it's been quite a long time since you released kapture and you probably don't intend to support it anymore, but on the off-chance that you still care, could you look into this exception that I keep getting, please?