Camera preview image is always the same
-
I'm using Camera element for capturing images on Symbian phone:
@ Camera {
id: camera
x: 0
y: 100
width: 360
height: 360
z: 1
focus: visible //to receive focus and capture key events
captureResolution : "480x480"
whiteBalanceMode: Camera.WhiteBalanceAutoonImageCaptured : { previewImage.source = preview previewImage.visible = true }@
On image captured preview image is displayed. The problem is that when you capture second image, preview from the previous take is displayed. Preview image is basically always the same, though the saved image is changing. I wonder how this can be fixed?
-
Problem is reproduced with following qml code, executed on android 4.2.1.
To be added in .pro:
@QT += core qml quick multimedia@Main.qml :
@import QtQuick 2.3
import QtQuick.Window 2.2
import QtMultimedia 5.0Window {
id: mainWindow
visible: true
Rectangle{
id: mainRectangle
anchors.fill: parent
MouseArea {
anchors.fill: parent
onClicked: {
if (mainRectangle.state === '') {
camera.imageCapture.capture();
}
else {
mainRectangle.state = '';
}
}
}
Camera {
id: camera
exposure.exposureMode: Camera.ExposureAuto
focus.focusMode: Camera.FocusContinuous
imageCapture {
onImageCaptured: {
photoPreview.source = preview;
mainRectangle.state = 'static';
}
}
}
VideoOutput {
id:videoOutput
anchors.fill: parent
source: camera
orientation: 270
visible : mainRectangle.state === ''
}
Image {
id: photoPreview
fillMode: Image.PreserveAspectFit
anchors.fill: parent
visible: mainRectangle.state === 'static'
cache: false
}
states: [
State {
name: "static"
}
]
}
}
@First tap will display correct preview, but next ones will always display the same.
Help would really be appreciated !Regards
MK -
any help on this issue ?
I've submitted a bug, but no news as well on that site :
https://bugreports.qt-project.org/browse/QTBUG-41442