summaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
index bafbbb8eb..c64a0de2a 100644
--- a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
+++ b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
@@ -64,6 +64,7 @@ import android.os.SystemProperties;
import android.util.Log;
import android.view.Surface;
+import com.android.camera.CaptureModule;
import com.android.camera.MediaSaveService;
import com.android.camera.MediaSaveService.OnMediaSavedListener;
import com.android.camera.PhotoModule.NamedImages;
@@ -712,6 +713,15 @@ public class ClearSightImageProcessor {
reprocRequest.set(CaptureRequest.NOISE_REDUCTION_MODE,
CaptureRequest.NOISE_REDUCTION_MODE_OFF);
+ Rect cropRect = image.mImage.getCropRect();
+ if(cropRect != null &&
+ !cropRect.isEmpty()) {
+ // has crop rect. apply to jpeg request
+ reprocRequest.set(CaptureModule.JpegCropEnableKey, (byte)1);
+ reprocRequest.set(CaptureModule.JpegCropRectKey,
+ new int[] {cropRect.left, cropRect.top, cropRect.width(), cropRect.height()});
+ }
+
mImageWriter[camType].queueInputImage(image.mImage);
session.capture(reprocRequest.build(),