panpf / sketch

Sketch is an image loading library designed for Compose Multiplatform and Android View. It is powerful and rich in functions. In addition to basic functions, it also supports GIF, SVG, video thumbnails, Exif Orientation, etc.
Apache License 2.0
2k stars 307 forks source link

Gravity of zoomable images #162

Closed saket closed 1 year ago

saket commented 1 year ago

When an image is zoomed, SketchZoomImageView's current behavior is to scale on all sides which makes sense for most image viewer apps where the image is displayed at the center. Will it be possible to customize this behavior by taking in a "gravity"? I am trying to display an image at the top of the screen. If the image is zoomed, I'd like it to scale up towards the bottom edge of the image until it reaches its maximum height.

panpf commented 1 year ago

I can't imagine such a usage scenario, please describe in more detail why there is such a requirement displayed at the top

saket commented 1 year ago

I have a screen that shows an image as its header. The image can be zoomed, but its height remains fixed.

saket commented 1 year ago

Closing in favor of telephoto.