summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Koenig <tobias.koenig.qnx@kdab.com>2013-02-26 08:49:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-26 13:32:18 +0100
commit68a38b151e5eb36568f6a2f51bdd95e312c20138 (patch)
tree6e84d6ca53f51b34542307db274ea3725c274a34
parent74f0e41da5416fe41c10e0b673aef6c47cb56c2d (diff)
BlackBerry: Mirror viewfinder for front camera
If the camera viewfinder shows the front camera we mirror the image now to avoid that on rotation of the device the image tilts to the wrong side. The captured image however is not mirrored. Change-Id: I6127b8ee6552553efe56ebec81991f0bd7597f47 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
-rw-r--r--src/plugins/blackberry/camera/bbcamerasession.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/blackberry/camera/bbcamerasession.cpp b/src/plugins/blackberry/camera/bbcamerasession.cpp
index faa3e9292..d2eb62278 100644
--- a/src/plugins/blackberry/camera/bbcamerasession.cpp
+++ b/src/plugins/blackberry/camera/bbcamerasession.cpp
@@ -879,7 +879,9 @@ void BbCameraSession::viewfinderFrameGrabbed(const QImage &image)
transform.rotate(m_nativeCameraOrientation);
- const QImage frame = image.copy().transformed(transform);
+ QImage frame = image.copy().transformed(transform);
+ if (m_device == cameraIdentifierFront())
+ frame = frame.mirrored(true, false);
QMutexLocker locker(&m_surfaceMutex);
if (m_surface) {