summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rw-r--r--src/com/android/camera/CaptureModule.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index b35da5d06..20b25f3aa 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -71,6 +71,8 @@ import android.view.SurfaceHolder;
import android.view.View;
import android.widget.Toast;
+import com.android.camera.exif.ExifInterface;
+import com.android.camera.Exif;
import com.android.camera.imageprocessor.filter.ImageFilter;
import com.android.camera.imageprocessor.PostProcessor;
import com.android.camera.imageprocessor.FrameProcessor;
@@ -1302,8 +1304,11 @@ public class CaptureModule implements CameraModule, PhotoController,
byte[] bytes = getJpegData(image);
mLastJpegData = bytes;
+ ExifInterface exif = Exif.getExif(bytes);
+ int orientation = Exif.getOrientation(exif);
+
mActivity.getMediaSaveService().addImage(bytes, title, date,
- null, image.getWidth(), image.getHeight(), 0, null,
+ null, image.getWidth(), image.getHeight(), orientation, null,
mOnMediaSavedListener, mContentResolver, "jpeg");
image.close();
}
@@ -1342,8 +1347,11 @@ public class CaptureModule implements CameraModule, PhotoController,
mLastJpegData = bytes;
buffer.get(bytes);
+ ExifInterface exif = Exif.getExif(bytes);
+ int orientation = Exif.getOrientation(exif);
+
mActivity.getMediaSaveService().addImage(bytes, title, date,
- null, image.getWidth(), image.getHeight(), 0, null,
+ null, image.getWidth(), image.getHeight(), orientation, null,
mOnMediaSavedListener, mContentResolver, "jpeg");
image.close();
}
@@ -3160,9 +3168,12 @@ public class CaptureModule implements CameraModule, PhotoController,
byte[] monoBytes = getJpegData(monoImage);
mLastJpegData = bayerBytes;
+ ExifInterface exif = Exif.getExif(bayerBytes);
+ int orientation = Exif.getOrientation(exif);
+
mActivity.getMediaSaveService().addMpoImage(
null, bayerBytes, monoBytes, width, height, title,
- date, null, 0, mOnMediaSavedListener, mContentResolver, "jpeg");
+ date, null, orientation, mOnMediaSavedListener, mContentResolver, "jpeg");
bayerImage.close();
bayerImage = null;