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

HEIC Images not rotated based on Exif info #4265

Closed
LikeTheSalad opened this issue Jun 19, 2020 · 1 comment · Fixed by #4273
Closed

HEIC Images not rotated based on Exif info #4265

LikeTheSalad opened this issue Jun 19, 2020 · 1 comment · Fixed by #4273
Labels

Comments

@LikeTheSalad
Copy link

Glide Version:
4.11.0

Integration libraries:
None

Device/Android Version:
Android emulator API 28

Issue details / Repro steps / Use case background:
Loading local HEIC image which has a rotation param of 90 degrees.
Expected: The image is automatically rotated before displaying it.
Actual: Rotation is not done.

Glide load line / GlideModule (if any) / list Adapter code (if any):

Glide.with(Context)
    .asBitmap()
    .load(File(imagePath))
    .format(DecodeFormat.PREFER_RGB_565)
    .fitCenter()
    .into(ImageView)

Possible solution
I think I know the reason for this issue to happen, it's the version Glide uses of the Android's Jetpack Exif Interface lib: https://developer.android.com/jetpack/androidx/releases/exifinterface, which is currently 1.0.0, which has an issue to retrieve the proper HEIC images rotation info. If you guys update it to use the latest 1.2.0 version, it should be sorted :)

Regards,
Cesar.

@sjudd sjudd added the bug label Jun 24, 2020
@sjudd
Copy link
Collaborator

sjudd commented Jun 24, 2020

Thanks for the detailed report and suggested fix!

I think as a workaround you might be able to require v1.2.0 of that library in your application. That should force gradle to use the newer version.

copybara-service bot pushed a commit that referenced this issue Jun 24, 2020
Fixes #4265

PiperOrigin-RevId: 318094022
copybara-service bot pushed a commit that referenced this issue Jun 24, 2020
Fixes #4265

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

Successfully merging a pull request may close this issue.

2 participants