summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2015-11-17 14:08:43 -0800
committerMichael Bestas <mkbestas@lineageos.org>2019-09-10 22:43:11 +0300
commitf4927f5a8c03e8c8a08cf99941cce705442b703c (patch)
treed9204b22bc38c0a2361db70c51dd4a60161dfcba
parent9715834caf811314a740ca724a35a92e4bc3450d (diff)
downloadandroid_packages_apps_Camera2-f4927f5a8c03e8c8a08cf99941cce705442b703c.tar.gz
android_packages_apps_Camera2-f4927f5a8c03e8c8a08cf99941cce705442b703c.tar.bz2
android_packages_apps_Camera2-f4927f5a8c03e8c8a08cf99941cce705442b703c.zip
Don't attempt to convert degree to orientation enum twice
* Exif.getOrientation already calls getRotationForOrientationValues, which returns a degree value. Don't attempt to convert that degree value back into degrees, that makes no sense. Change-Id: Ie35a0683e2d36801a9130ec19e1b3aa1f48b92c2
-rw-r--r--src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java b/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
index 2e5976c46..e1d1689cc 100644
--- a/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
+++ b/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
@@ -95,8 +95,7 @@ public class TaskCompressImageToJpeg extends TaskJpegEncode {
*/
public Map<Integer, Integer> exifGetMinimalTags(ExifInterface exif) {
Map<Integer, Integer> map = new HashMap<>();
- map.put(ExifInterface.TAG_ORIENTATION,
- ExifInterface.getRotationForOrientationValue((short) Exif.getOrientation(exif)));
+ map.put(ExifInterface.TAG_ORIENTATION, Exif.getOrientation(exif));
map.put(ExifInterface.TAG_PIXEL_X_DIMENSION, exif.getTagIntValue(
ExifInterface.TAG_PIXEL_X_DIMENSION));
map.put(ExifInterface.TAG_PIXEL_Y_DIMENSION, exif.getTagIntValue(