PatilShreyas / Capturable

🚀Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image🖼️
https://patilshreyas.github.io/Capturable/
MIT License
1.04k stars 36 forks source link

[WIP] feat: added v1 for kmm. needs cleanup #164

Open anuragdalia opened 5 months ago

anuragdalia commented 5 months ago

Summary

Checklist

anuragdalia commented 5 months ago

@PatilShreyas what do you suggest?

PatilShreyas commented 5 months ago

@anuragdalia that's nice! Let me review the changes and will get back.

Meanwhile, I assume you might have utilized the latest API from compose: https://developer.android.com/develop/ui/compose/graphics/draw/modifiers#composable-to-bitmap

anuragdalia commented 5 months ago

Sure.

The new api is only available in 1.7.0-alpha. Plus havent read enough on this to say if it's available on kmm or only android. I took inspiration from #142

PatilShreyas commented 5 months ago

The new api is only available in 1.7.0-alpha. Plus havent read enough on this to say if it's available on kmm or only android. I took inspiration from #142

AFAIK, that new API is Multi-platform compatible. That's why looks more promising and reliable too. Will check it and will get back to you

PatilShreyas commented 5 months ago

@anuragdalia have you tested this implementation with any example on iOS simulator?

anuragdalia commented 5 months ago

Hey yes! I did test it on an ios device. Infact I'm using it in an app.

PatilShreyas commented 3 months ago

@anuragdalia Any update on the changes which we discussed?

minmax1993 commented 2 months ago

Thank you @PatilShreyas for the amazing library and for adding the kmm support @anuragdalia. I know it's not officially released, but I've tested the branch and would like to give some feedback about iOS capturable. @anuragdalia have you tested the capturable with iOS Webview? It's captured as a white bitmap image.

PatilShreyas commented 1 month ago

Thank you @PatilShreyas for the amazing library and for adding the kmm support @anuragdalia. I know it's not officially released, but I've tested the branch and would like to give some feedback about iOS capturable. @anuragdalia have you tested the capturable with iOS Webview? It's captured as a white bitmap image.

@minmax1993 Would be helpful if you share your feedback

ssttkkl commented 1 month ago

@anuragdalia Well I found the iOS implementation didn't use any iOS API so it can also runs on desktop and web. I added desktop and wasmJs target and created a PR: https://github.com/anuragdalia/Capturable/pull/1

anuragdalia commented 3 weeks ago

Thank you @PatilShreyas for the amazing library and for adding the kmm support @anuragdalia. I know it's not officially released, but I've tested the branch and would like to give some feedback about iOS capturable. @anuragdalia have you tested the capturable with iOS Webview? It's captured as a white bitmap image.

Hi @minmax1993 no, i havent tested it specifically with ios webview. the ios webview is going to be a native component, so i am not sure if it will actually work. will give it a try next time i sit on this