-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Can not resize correctly #3673
Labels
Comments
By using |
What version of Android were you using? |
Actually this definitely looks like a bug, nice catch, thanks for reporting. |
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Jun 1, 2019
Android’s ExifInterface only supports writing orientations to JPEGs, so for now that’s all I’m starting with. We should investigate other open source image writers and considering using one that supports other formats. Related to bumptech#3673, but not sufficient because there’s clearly a bug but all tests here still pass.
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Jun 1, 2019
Previously we were sometimes using the rotated size and sometimes using the original size. As a result, some combinations of width, height and exif orientation were decoded with unexpected sizes. Fixes bumptech#3673
@sjudd
The problem was confirmed in 5.1, 9.0. |
@sjudd |
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Sep 24, 2021
Android’s ExifInterface only supports writing orientations to JPEGs, so for now that’s all I’m starting with. We should investigate other open source image writers and considering using one that supports other formats. Related to bumptech#3673, but not sufficient because there’s clearly a bug but all tests here still pass.
sjudd
added a commit
to sjudd/glide
that referenced
this issue
Sep 24, 2021
Previously we were sometimes using the rotated size and sometimes using the original size. As a result, some combinations of width, height and exif orientation were decoded with unexpected sizes. Fixes bumptech#3673
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glide Version: 4.5.0
Issue details / Repro steps / Use case background:
I was trying to resize an image like the one below.
Tried the following code.
I wanted an image
1977x2636
.However, I got an image
2636x3515
.Below is the Downsampler's log.
Examined the calculation of
exact scale factor
andadjusted scale factor
ofCalculate scaling
.exact scale factor
consider the orientation.see: Downsampler.java#L346-L356
However,
adjusted scale factor
does not consider the orientation.see: Downsampler.java#L440-L441
I think that this is why can not resize correctly.
Is the calculation of the
adjusted scale factor
correct, or a bug?The text was updated successfully, but these errors were encountered: