Skip to content

Picture zoomed too much #3312

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

Closed
chinmoy12c opened this issue Dec 30, 2019 · 11 comments
Closed

Picture zoomed too much #3312

chinmoy12c opened this issue Dec 30, 2019 · 11 comments

Comments

@chinmoy12c
Copy link

Summary:
When a picture is clicked, the picture is zoomed to the point that parts of the picture are not visible.

Steps to reproduce:
Open any picture in featured or mobile uploads.

Device and Android version:
I'm using Redmi note 7s with android version 9(Pie)

Commons app version:
version 2.11.0

Screen-shots:
Screenshot_2019-12-30-18-18-53-445_fr free nrw commons

Screenshot_2019-12-30-18-18-56-921_fr free nrw commons

Would you like to work on the issue?
Yes, I would like to work on this issue. I have found a way to fix it by using https://github.com/ongakuer/PhotoDraweeView and i request permission to use this library.

@nicolas-raoul
Copy link
Member

So, do you suggest showing the picture at the top and fill the rest with black?

Is there really no way to achieve that without using the PhotoDraweeView library?

@chinmoy12c
Copy link
Author

chinmoy12c commented Dec 30, 2019

So, do you suggest showing the picture at the top and fill the rest with black?

Is there really no way to achieve that without using the PhotoDraweeView library?

Yes, the library places the image automatically in the centre and it looks good on the black background as well.

Screenshot_2019-12-30-20-33-11-866_fr free nrw commons beta

Screenshot_2019-12-30-20-28-52-257_fr free nrw commons beta

The reason for using PhotoDraweeView library was that it was an extension to the Fresco library so it was compatible with existing code. If you want i can look for a way to achieve this without the library.

@chinmoy12c
Copy link
Author

Found a better solution without using the library , changing the scale type to fitCenter fixed the issue.

Screenshot_2019-12-31-01-15-15-711_fr free nrw commons beta

EXTRA MODIFICATIONS
Should I make the background black as well? It looks better.

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Dec 31, 2019 via email

@chinmoy12c
Copy link
Author

This is how it looks now.

Screenshot_2019-12-31-11-35-14-939_fr free nrw commons beta
Screenshot_2019-12-31-11-35-10-156_fr free nrw commons beta
Screenshot_2019-12-31-11-33-39-724_fr free nrw commons beta
Screenshot_2019-12-31-11-33-35-363_fr free nrw commons beta
Screenshot_2019-12-31-11-33-31-079_fr free nrw commons beta

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Jan 1, 2020 via email

@chinmoy12c
Copy link
Author

These are landscape view screenshots
Screenshot_2020-01-01-12-40-55-304_fr free nrw commons beta
Screenshot_2020-01-01-12-39-58-700_fr free nrw commons beta
Screenshot_2020-01-01-12-40-09-460_fr free nrw commons beta

@nicolas-raoul
Copy link
Member

Looks great!
Could you please send a pull request and post the link to it here?
Thanks :-)

@chinmoy12c
Copy link
Author

This is the pull request link.
#3315 (comment)
Thank You :)

@madhurgupta10
Copy link
Collaborator

@nicolas-raoul Was the issue closed without any PR merger?

@kbhardwaj123
Copy link
Contributor

kbhardwaj123 commented Mar 7, 2020

@madhurgupta10 actually I have added fix for this in my PR #3422 for handling zoom in which I have maintained the aspect ratio as requested in it's issue thread

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

No branches or pull requests

4 participants