summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2015-11-17 14:08:43 -0800
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 20:06:32 +0200
commitac423bb6ee43451c3c8476072e2791f51d0f6510 (patch)
tree61369250a5edf660e4261aa0e2c96b9e5a6b0184
parent223a9885f859082e60104c6f1ae0f7df1f25a203 (diff)
downloadandroid_packages_apps_Camera2-ac423bb6ee43451c3c8476072e2791f51d0f6510.tar.gz
android_packages_apps_Camera2-ac423bb6ee43451c3c8476072e2791f51d0f6510.tar.bz2
android_packages_apps_Camera2-ac423bb6ee43451c3c8476072e2791f51d0f6510.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(