mahozad / comshot

Capture screenshot of Composables and Views (multiplatform)
Apache License 2.0
35 stars 1 forks source link

Not receiving full composable ImageBitmap on desktop jvm #2

Open khebrati opened 4 months ago

khebrati commented 4 months ago

The composable function that I am trying to take a screen shot of is a screen with a long height that is scrollable. I have noticed that no matter what composable function I pass to your library's "captureToImage" function on jvm desktop, it will output an ImageBitmap with height : 768 and width: 1024. So in my case, to ImageBitmap lacks 70 percent of the composable height because it doesn't fit in 768 pixels! Is there any way we can change this? I mean, is it configurable in this version of your library? and if it's not, please guide me to the changes I can make to the source code to make this happen. thanks in advance!

khebrati commented 4 months ago

I just checked and there is a similar problem in android. I get very weird and huge bitmap height and width passing my composables, things like 840 15000, 665 15000 , 15000 * 15000 ( Idk why it insists on 15000!). it also doesn't preserve the aspect ratio

mahozad commented 4 months ago

Sorry for the late response. I will check to see what I can do.