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>
This commit is contained in:
Tobias Koenig
2013-02-26 08:49:16 +01:00
committed by The Qt Project
parent 74f0e41da5
commit 68a38b151e

View File

@@ -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) {