-
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
EXIF Orientation bug #559
Comments
Hi, @ziem |
You are right. I overlooked it. considerExifParams(true) solved my problem, thanks. |
It really helped me to solve this problem. Thanks a lot. This is really awesome library. |
hi :I used the 1.9.2 jar and set considerExifParams(true) and cacheOnDisc(true) but this problem is also exist |
@carl1990 I have the same problem |
Can you provide image URL which is displayed wrong? |
sorry! I am in debug environment use company intranet,so the url u can not access. |
before is wrong public static DisplayImageOptions getDefaultDisplayImageOptions(
Context context) {
return new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_default)
.showImageForEmptyUri(R.drawable.ic_default)
.showImageOnFail(R.drawable.ic_default)
.cacheInMemory(true)
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.cacheOnDisk(true)
.considerExifParams(true)
.displayer(
new RoundedBitmapDisplayer(context.getResources()
.getDimensionPixelSize(R.dimen.icon_rounded)))
.build();
} after is right public static DisplayImageOptions getDefaultDisplayImageOptions(
Context context) {
return new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_default)
.showImageForEmptyUri(R.drawable.ic_default)
.showImageOnFail(R.drawable.ic_default)
.cacheInMemory(true)
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.cacheOnDisk(true)
.considerExifParams(false)
.displayer(
new RoundedBitmapDisplayer(context.getResources()
.getDimensionPixelSize(R.dimen.icon_rounded)))
.build();
} |
When I set "considerExifParams (true)",the picture displayed on the phone in the wrong direction.But when I open the SD card cache files and found the picture in the right direction,this is really incredible. After several attempts, I set "considerExifParams (false)",the picture displayed on the phone in the right direction. |
@ihenk I tested your link and realized this weird behavior. It seems this image is rotated during decoding into Bitmap. I'll investigate this case. |
I faced this issue now. I also try
Can someone help me to point out the issue here? |
I also meet the problem. But when I use MediaStore.Image.Thumbnail.Data, the Image rotated wrongly even though I set considerExifParams to true. I also set cacheOnDisk, but it doesn't solve the problem. |
To make gallery for images, I am using below code to query Media Store:
To initialize Image Loader, I have used below code: DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
I have written custom ImageDecoder because Universal Image loader works properly to show image thumbnail. But I wanted to show thumbnail for videos, audios as well. I am using "universal-image-loader-1.9.2-SNAPSHOT-with-sources" |
The same issue for me. Both leads to the same result - not properly rotated photo for portrait made images. Landscape photo is shown properly. universal-image-loader:1.9.4 |
Hello i faced the problem in U.I.L. V-1.9.4.Please share the findings and fix the bug.I think it is one of the major bug of this library as they offered that feature with a heavy note. |
Until the problem is fixed, I used Picasso. It automatically solves this. |
@Cedriga The Picasso has the same problem in SAMSUNG NOTE III with android 4.4 |
Actually .considerExifParams(true) works for me. However make sure that you setup options and pass them to ImageLoader on any activity where you display images, Gallery, ImageDetail etc... Here is my code:
|
My activity view is in landscape mode. I am using all but still image is set rotate on image view. options = new DisplayImageOptions.Builder() The same issue for me. Both |
It's more of a compatibility issue in KitKat, Lollipop I think. |
you need override the BaseImageDecoder.class and override the canDefineExifParams method,add image/png mimetype,then everything is ok |
Is this solved? |
sorry ,no... ------------------ 原始邮件 ------------------ 主题: Re: [nostra13/Android-Universal-Image-Loader] EXIF Orientation bug(#559) Is this solved? — |
i got the reason,that is because of mimeType in method canDefineExifParams(String imageUri, String mimeType) of the class BaseImageDecoder you should add "image/png" in this method. 在 2016-04-01 15:25:18,"dylan" notifications@github.com 写道: ------------------ 原始邮件 ------------------ 主题: Re: [nostra13/Android-Universal-Image-Loader] EXIF Orientation bug(#559) Is this solved? — — |
Some sample code @rx123rx ? |
thanks ,i try it later... ------------------ 原始邮件 ------------------ i got the reason,that is because of mimeType in method canDefineExifParams(String imageUri, String mimeType) of the class BaseImageDecoder you should add "image/png" in this method. 在 2016-04-01 15:25:18,"dylan" notifications@github.com 写道: ------------------ 原始邮件 ------------------ 主题: Re: [nostra13/Android-Universal-Image-Loader] EXIF Orientation bug(#559) Is this solved? — — |
private boolean canDefineExifParams(String imageUri, String mimeType) { because of the suffix of the pictures in the cache is .png,i just override this method like this. 在 2016-04-01 15:44:36,"Jorge Garrido" notifications@github.com 写道: Some sample code @rx123rx ? — |
ha ha ,thanks,may i take your contact information? ------------------ 原始邮件 ------------------ private boolean canDefineExifParams(String imageUri, String mimeType) { because of the suffix of the pictures in the cache is .png,i just override this method like this. 在 2016-04-01 15:44:36,"Jorge Garrido" notifications@github.com 写道: Some sample code @rx123rx ? — |
does it work? 在 2016-04-01 15:45:42,"dylan" notifications@github.com 写道: ------------------ 原始邮件 ------------------ i got the reason,that is because of mimeType in method canDefineExifParams(String imageUri, String mimeType) of the class BaseImageDecoder you should add "image/png" in this method. 在 2016-04-01 15:25:18,"dylan" notifications@github.com 写道: ------------------ 原始邮件 ------------------ 主题: Re: [nostra13/Android-Universal-Image-Loader] EXIF Orientation bug(#559) Is this solved? — — — |
@rx123rx Seems to work on Samsung devices... but Sony fails |
i think u can watch the logcat ,have a look what kind of suffix of the pictures in the cache then add this kind of mimeType in that method. 在 2016-04-01 17:51:02,"Jorge Garrido" notifications@github.com 写道: @rx123rx Seems to work on Samsung devices... but Sony fails — |
And it works on my HTC M8 . 在 2016-04-01 17:51:02,"Jorge Garrido" notifications@github.com 写道: @rx123rx Seems to work on Samsung devices... but Sony fails — |
@nostra13 : I have tried this section of logic and it works in mine case. |
I just faced the same problem on samsung devices but considerExifParams(true) just solved it. |
Hello , I am using this universal image loader lib for caching images. my code is :
For decryption code is :
|
I used this;- considerExifParams(true) worked for me. |
Hello,
I'm using UIL 1.9.1 in my recent project. I saw that UIL is now supporting EXIF orientation #172 but I encountered issue when loading photos from SD card. In my application image is rotated by 90 degrees, but in Android gallery everything is ok.
Screens:
Code:
ImageLoader.getInstance().displayImage("file:///" + currentPhotoAbsolutePath, imageView, ImageLoaderOptions.GALLERY);
public static DisplayImageOptions GALLERY = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.build();
According to #172 (comment) it should work because I'm loading local files.
The problem occurs on:
The text was updated successfully, but these errors were encountered: