-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Problems - exif oriented image #126
Comments
EXIF orientation is handled in Release 3.4.0 when image is from media store, but not when image comes from file. Please handle also this case with ExifInterface as suggested here. Thank you. |
Fixed in release 3.4.1 |
I just encountered this problem on 3.4.1 with a local file |
I confirm problem is not fixed in 3.4.1. Please reopen issue. |
Can you please provide:
|
Screenshot original img android 5.x at least, sony experia & emulator genymotion |
@Uscher1 I just tried with image.setOrientation(SubsamplingScaleImageView.ORIENTATION_USE_EXIF); and it works. @davemorrissey shouldn't it be the default behaviour? |
EXIF orientation is only enabled if you use that setting, as the wiki says. The default has always been to display the image in its native orientation because EXIF support was added some time after I released this library. Changing the default would be backwardly incompatible and lead to unexpected problems for some developers, as well as making the initialisation slightly slower. It looks like all the comments on this bug since I closed it don't actually relate to the original bug, and the problems appear to be caused by the USE_EXIF setting not being enabled. |
I expected EXIF to be considered by default. But I see using ORIENTATION_USE_EXIF does the trick. |
I'm still seeing bugs with ORIENTATION_USE_EXIF, when I use subsamplingScaleImageView.setImage(ImageSource.uri(...));. It works if I check the Exif rotation values of the file myself and set the orientation manually. Note that the uris are of the type "content://mms/part/[id]". I didn't test if it's specific to mms uris or not. |
Sometimes they are not placed correctly, instead of centered they are wrongly placed on top, probably becasue they are not rotated as they should be. I use the images in a
ViewPager
and the auto rotation does sometimes work, sometimes not...My solution looks like following and is working always, don't know why yours does not (I only use images from the sd card, so they are either from the media store directly or they have an uri created from a path - this is for all hidden images):
With following
getRotation
function:If I manually rotate the image, everything is working fine
The text was updated successfully, but these errors were encountered: