fixed orientation of DNG thumbnails from content resolver
This commit is contained in:
parent
652a5383ea
commit
32a7dfcad4
1 changed files with 6 additions and 2 deletions
|
@ -120,10 +120,14 @@ public class ImageDecodeTask extends AsyncTask<ImageDecodeTask.Params, Void, Ima
|
||||||
AvesImageEntry entry = params.entry;
|
AvesImageEntry entry = params.entry;
|
||||||
Integer width = params.width;
|
Integer width = params.width;
|
||||||
Integer height = params.height;
|
Integer height = params.height;
|
||||||
// Log.d(LOG_TAG, "getThumbnailBytesByResolver width=" + width + ", path=" + entry.path);
|
|
||||||
|
|
||||||
ContentResolver resolver = activity.getContentResolver();
|
ContentResolver resolver = activity.getContentResolver();
|
||||||
return resolver.loadThumbnail(entry.uri, new Size(width, height), null);
|
Bitmap bitmap = resolver.loadThumbnail(entry.uri, new Size(width, height), null);
|
||||||
|
String mimeType = entry.mimeType;
|
||||||
|
if (MimeTypes.DNG.equals(mimeType)) {
|
||||||
|
bitmap = rotateBitmap(bitmap, entry.orientationDegrees);
|
||||||
|
}
|
||||||
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap getThumbnailBytesByMediaStore(Params params) {
|
private Bitmap getThumbnailBytesByMediaStore(Params params) {
|
||||||
|
|
Loading…
Reference in a new issue