diff options
author | mingwax <mingwax@codeaurora.org> | 2016-12-29 16:16:06 +0800 |
---|---|---|
committer | mingwax <mingwax@codeaurora.org> | 2016-12-29 16:26:09 +0800 |
commit | c6d2af9f7ad833aa7612cd608176224fa42d5317 (patch) | |
tree | 22ceeaee77a0a0f21f1bdab302eb037e019cad44 /src/com/android/camera/imageprocessor | |
parent | ec1cdf7f6b81e42e90c6d0627955eae5fac1f294 (diff) | |
download | android_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
Diffstat (limited to 'src/com/android/camera/imageprocessor')
-rw-r--r-- | src/com/android/camera/imageprocessor/PostProcessor.java | 10 |
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 |