I need to download an image with Coil on Compose, ...
# compose
m
I need to download an image with Coil on Compose, then draw on the bitmap and finally share the image via Intent. Wondering if anyone has done that in the compose world: how’d you go about it? I was thinking of downloading the image with Coil, accessing the bitmap, drawing it on a Canvas, editing it, saving the bitmap from the canvas into external storage and finally sharing it from there.
m
I’ve done something similar in the past, I’ve been using custom loader to access Bitmap object
that was before Coil had support for compose and I was using accompanist version
but I image it’s similar now
m
Cool, thanks! I tested this out and the bitmap was neatly accessible https://stackoverflow.com/a/68236579
👍🏻 1
m
that’s neat yeah
c
m
Thanks for the link 👍
I kept on trying with the
Canvas
and turns out you can pull
nativeCanvas
from it, draw there and then export. Feels nasty, but works