Has anyone accomplished the following in common co...
# compose-ios
m
Has anyone accomplished the following in common code, or knows if it’s already possible with existing tooling? Step 1) 🎨 Draw on Canvas Step 2) 🧮 Convert Canvas to ByteArray Step 3) ⬆️ Upload Byte Array with Ktor to server Step 3 is of course possible already - I’m wondering on the converting Canvas content to ByteArray part
1
d
On Android it’s pretty straightforward . On iOS you need a small work around, you can either consider going the cinterop way and for the ByteArray conversion on iOS . Take a look at peekaboo multiplatform camera lib he has the work Around.
m
Hey @Dennis, are you specifically talking about transforming a
Compose Canvas to Byte Array
on iOS?
c
Do you want the bytearray to be an image? Or just want an exported canvas file that can imported into another compose canvas??
m
Hey @Cherrio LLC, I want to let the user draw his signature on a Compose Canvas and then i want to upload this canvas (as ByteArray or so) to my server via Ktor. You know if that’s possible using ComposeCanvas?
c
Yes it is Check Qrose
d
Ooh @Max I ment converting iOS image to byte Array, I was hoping it would provide you with more Context on how you would replicate the same
m
@Cherrio LLC great, exactly what i was looking for! thanks for your help! @Dennis thx for your input 🙏🏽 i will try out the solution proposed in the links above
👍 1