Thank you,
When I put "console.log" after change resolution of camera I see resolution of camera is correct(in application output window)
var res = camera.supportedViewfinderResolutions();
var largestSize = 0;
for(var i=0;i<res.length;i++) {
var currentSize = res[i].width * res[i].height;
if (currentSize > largestSize) {
largestSize = currentSize;
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height);
}
}
console.log("w2:"+camera.viewfinder.resolution.width) //=> ok : highest resolution.width
console.log("h2:"+camera.viewfinder.resolution.height)//=> ok : highest resolution.height
var res = camera.supportedViewfinderResolutions();
var largestSize = 0;
for(var i=0;i<res.length;i++) {
var currentSize = res[i].width * res[i].height;
if (currentSize > largestSize) {
largestSize = currentSize;
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height);
}
}
console.log("w2:"+camera.viewfinder.resolution.width) //=> ok : highest resolution.width
console.log("h2:"+camera.viewfinder.resolution.height)//=> ok : highest resolution.height
To copy to clipboard, switch view to plain text mode
Then when this line of code runs I have this error:
camera.imageCapture.capture()
camera.imageCapture.capture()
To copy to clipboard, switch view to plain text mode
QCameraImageCapture error: "Camera not ready for capture"
Bookmarks