summaryrefslogtreecommitdiff
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-24 21:26:25 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-24 21:26:26 -0700
commit499184fc45c238aba88dad68016f89727b26ee1e (patch)
tree795b89ca00384308c03e1a0bb8ff66ecb57daf07 /src/com/android/camera/CaptureModule.java
parent7e96681d6c4e4f96e1a509ca8d971f67e4205e03 (diff)
parentbfab14264c6b8aee87d0383df8c00ca844c3bee4 (diff)
Merge "SnapdraongCamera:add HEIF support" into camera-SnapdragonCamera.lnx.2.0
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index a3466d8e9..6138e5269 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -31,6 +31,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.ImageFormat;
import android.graphics.Matrix;
import android.graphics.Point;
@@ -2434,6 +2435,24 @@ public class CaptureModule implements CameraModule, PhotoController,
byte[] bytes = getJpegData(image);
+ if (mSettingsManager.getSavePictureFormat() ==
+ SettingsManager.HEIF_FORMAT) {
+ String value = mSettingsManager.getValue(
+ SettingsManager.KEY_JPEG_QUALITY);
+ int qualityNumber = getQualityNumber(value);
+ mActivity.getMediaSaveService().addHEIFImageFromJpeg(bytes,
+ title,date,null,image.getWidth(),image.getHeight(),
+ 0,null,mContentResolver,
+ mOnMediaSavedListener,qualityNumber,"heif");
+ image.close();
+ if (mLongshotActive) {
+ mLastJpegData = bytes;
+ } else {
+ mActivity.updateThumbnail(bytes);
+ }
+ return;
+ }
+
if (image.getFormat() == ImageFormat.RAW10) {
mActivity.getMediaSaveService().addRawImage(bytes, title,
"raw");