Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit image in the screen width. Don't stretch small, don't extend large beyond screen size. #566

Open
tomekit opened this issue Jan 9, 2025 · 0 comments

Comments

@tomekit
Copy link

tomekit commented Jan 9, 2025

What initialScale to use to make this library work for images with width smaller than the screen size and images with width larger than the screen?

If initialScale is set to: PhotoViewComputedScale.contained, large images are contained, but small images are stretched like here: #306 (comment)

If initialScale is set to 1.0. then small images have original size (they're not stretched), however large images are already in zooming mode.

This issue is clearly visible if this library example is used.
Screenshot from 2025-01-09 19-13-20

Initially opened with stretch:
Screenshot from 2025-01-09 19-13-28

If zoomed out, looks correct (I would like this to be starting point)
Screenshot from 2025-01-09 19-14-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant