summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2016-12-29 16:16:06 +0800
committermingwax <mingwax@codeaurora.org>2016-12-29 16:26:09 +0800
commitc6d2af9f7ad833aa7612cd608176224fa42d5317 (patch)
tree22ceeaee77a0a0f21f1bdab302eb037e019cad44
parentec1cdf7f6b81e42e90c6d0627955eae5fac1f294 (diff)
downloadandroid_packages_apps_Snap-c6d2af9f7ad833aa7612cd608176224fa42d5317.tar.gz
android_packages_apps_Snap-c6d2af9f7ad833aa7612cd608176224fa42d5317.tar.bz2
android_packages_apps_Snap-c6d2af9f7ad833aa7612cd608176224fa42d5317.zip
SnapdragonCamera: Fix photo reversed when enable Selfie Mirror
When enable Selfie Mirror, horizontal screen mode should be seted the value of isVertical is false, vertical screen mode should be seted the value of isVertical is true, to ensure the picture direction is right. CRs-Fixed: 1106132 Change-Id: I88ff293e425c559dc32a70bc56801a5ccf5f7041
-rw-r--r--src/com/android/camera/imageprocessor/PostProcessor.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/camera/imageprocessor/PostProcessor.java b/src/com/android/camera/imageprocessor/PostProcessor.java
index 8e6caa953..7e302e3f1 100644
--- a/src/com/android/camera/imageprocessor/PostProcessor.java
+++ b/src/com/android/camera/imageprocessor/PostProcessor.java
@@ -943,7 +943,15 @@ public class PostProcessor{
}
if(isSelfieMirrorOn() && !mController.isBackCamera()) {
- nativeFlipNV21(resultImage.outBuffer.array(), resultImage.stride, resultImage.height, resultImage.stride - resultImage.width, true);
+ boolean isVertical = true;
+ if (mOrientation == 0 || mOrientation == 180) {
+ isVertical = false;
+ } else {
+ isVertical = true;
+ }
+ nativeFlipNV21(resultImage.outBuffer.array(), resultImage.stride,
+ resultImage.height, resultImage.stride - resultImage.width,
+ isVertical);
}
}
//End processing FrameProessor filter