Closed marek-scholtz closed 11 months ago
@marek-scholtz Thank you for letting me know. I have tried with several high resolution images. However, I could not reproduce the symptom of crashing only when zoomable is used. Images that stopped app that use zoomable also stopped app that do not use zoomable. Is there any good way to reproduce this?
Thank you for your response @usuiat! After deeper investigation, I found that it has something in common with Coil's ImageRequest
and its size
parameter. Setting this parameter to Size.ORIGINAL
should improve zoomable experience, but when the image has high resolution, it crashes regardless of the use of your zoomable
modifier. Without settings size
parameter to Size.ORIGINAL
, Coil is shrinking images, so zooming loses a bit of its meaning but it doesn't crash at least 🙂. Thank you and closing the issue.
I recommend a similar image zooming library ZoomImage (https://github.com/panpf/zoomimage).
It perfectly supports Compose Multiplatform and Android View, supports zooming, panning, positioning, rotation, and subsampling of large images. It also integrates image loaders such as sketch, glide, picasso, coil, etc.
The most important thing is that it can zoom large images without memory overflow
Loading high resolution images (e.g. panoramas) to
Image
orAsyncImage
composable withzoomable
modifier leads to crash. Removingzoomable
modifier fixes the crash. It seems, that "maximum supported resolution" depends on device.