onseok / peekaboo

🌄 Kotlin Multiplatform library for Compose Multiplatform, designed for seamless integration of an image picker feature in iOS and Android applications.
Apache License 2.0
241 stars 20 forks source link

Add the abilitity to include ResizeOptions with either rememberPeekabooCameraState or PeekabooCamera #94

Open DevinDuricka opened 3 months ago

DevinDuricka commented 3 months ago

It would be nice to include the resize options with the image capture. Ideally I would like to share the same resize options between the camera and the gallery selector.


[Background] I was running into an issue when viewing captured images in a lazy grid. The scroll effect was pretty choppy because it was rendering the full size images. I found a workaround to the scroll issue, using Coil v3's AsyncImage to handle the caching and display of the image. Much smoother now. I did realize though, that when I upload these images to a server, especially in a low bandwidth area, I would like to pre-compress the images, but I haven't found a good utility for that yet (hence this issue). I have a max size for an image for the server, so it would be nice to just set the global resize option for both sources of images.