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

Problem with landscape images #93

Closed
vernazza opened this issue Nov 1, 2012 · 1 comment
Closed

Problem with landscape images #93

vernazza opened this issue Nov 1, 2012 · 1 comment
Labels

Comments

@vernazza
Copy link

vernazza commented Nov 1, 2012

If you have a landscape image (with width longer than height), but the device is in portrait mode, the library does some wrong operations.

In ImageLoader, lines 424-430, the getImageSizeScaleTo function exchanges width with eight if the image is landscape and the devise is portrait (and vice versa).

In this way, if you have an image of WxH, where W > H, the image is scaled to HxW, then when the view is shown, it's scaled again to WxH... but the width W has the resolution of H, and the height H has the resolution W.

You can see in this image what the image should looks like (and hot the image is shown if commenting out lines 424-430) and how the image is shown at the moment
http://i50.tinypic.com/2dt56y1.png

@nostra13
Copy link
Owner

nostra13 commented Nov 2, 2012

Interesting... I try to remember why I included this piece of code for orientation consideration. For now it seems to be really wrong. I'll check it and fix it in the following lib version.
Thank you for bug :)

nostra13 added a commit that referenced this issue Nov 3, 2012
Fixed calculation of size the original image is needed scale to
@nostra13 nostra13 closed this as completed Nov 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants