Skip to content

Commit cceb30b

Browse files
committed
Stop logging warnings for EXIF rotation undefined
1 parent 36cc125 commit cceb30b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/src/com/davemorrissey/labs/subscaleview/ScaleImageView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ protected int[] doInBackground(Void... params) {
915915
try {
916916
ExifInterface exifInterface = new ExifInterface(sourceUri.substring(FILE_SCHEME.length() - 1));
917917
int orientationAttr = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
918-
if (orientationAttr == ExifInterface.ORIENTATION_NORMAL) {
918+
if (orientationAttr == ExifInterface.ORIENTATION_NORMAL || orientationAttr == ExifInterface.ORIENTATION_UNDEFINED) {
919919
exifOrientation = ORIENTATION_0;
920920
} else if (orientationAttr == ExifInterface.ORIENTATION_ROTATE_90) {
921921
exifOrientation = ORIENTATION_90;

library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ protected int[] doInBackground(Void... params) {
11101110
try {
11111111
ExifInterface exifInterface = new ExifInterface(sourceUri.substring(FILE_SCHEME.length() - 1));
11121112
int orientationAttr = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
1113-
if (orientationAttr == ExifInterface.ORIENTATION_NORMAL) {
1113+
if (orientationAttr == ExifInterface.ORIENTATION_NORMAL || orientationAttr == ExifInterface.ORIENTATION_UNDEFINED) {
11141114
exifOrientation = ORIENTATION_0;
11151115
} else if (orientationAttr == ExifInterface.ORIENTATION_ROTATE_90) {
11161116
exifOrientation = ORIENTATION_90;

0 commit comments

Comments
 (0)