I'm trying to tile an image across the width of a ...
# compose
s
I'm trying to tile an image across the width of a Box, my research suggests I need a ImageBitmap to accomplish this -- If that's accurate, what would be the best way to get an ImageBitmap on a WASM/Desktop/Android project? I currently have the asset in the commonMain resources folder, but I'm wondering if it would be easier to host it somewhere and load it over the network since WASM is involved?
m
What could be easier than storing the images as resources and access them via the multiplatform resources API if that fits your use-case? https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html#fc9c1d08 The only thing I don’t know for sure is whether the resources API already supports WASM. There is also a link for handling remote files. https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html#remote-files
s
I think I was just being thick or something
Copy code
imageResource(Res.drawable.asset_name)
Is what I needed 🤦 and then using
DrawScope.drawImage