
Originally Posted by
anda_skoa
And you have verified that this works?
_
function setMaxResulotion(){
var res = camera.supportedViewfinderResolutions();
camera.viewfinder.resolution.width = res[res.length-1].width;
camera.viewfinder.resolution.height = res[res.length-1].height;
for(var i=0;i<res.length;i++)
{
if(res[i].width>camera.viewfinder.resolution.width)
{
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height)
}
else if(res[i].width===camera.viewfinder.resolution.width){
if(res[i].height>camera.viewfinder.resolution.height)
{
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height);
}
}
}
}
function setMaxResulotion(){
var res = camera.supportedViewfinderResolutions();
camera.viewfinder.resolution.width = res[res.length-1].width;
camera.viewfinder.resolution.height = res[res.length-1].height;
for(var i=0;i<res.length;i++)
{
if(res[i].width>camera.viewfinder.resolution.width)
{
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height)
}
else if(res[i].width===camera.viewfinder.resolution.width){
if(res[i].height>camera.viewfinder.resolution.height)
{
camera.viewfinder.resolution = Qt.size(res[i].width,res[i].height);
}
}
}
}
To copy to clipboard, switch view to plain text mode

Originally Posted by
anda_skoa
Have you tried setting these values after the capture has finished?
_
I tried capture with highest resolution.
But I have this error when use "setMaxResulotion" function:
QCameraImageCapture error: "Camera not ready for capture"
QCameraImageCapture error: "Camera not ready for capture"
To copy to clipboard, switch view to plain text mode
var w=camera.viewfinder.resolution.width;
console.log("w1:"+w) //=> low resolution.width
var h=camera.viewfinder.resolution.height;
setMaxResulotion();//set highest resolution
console.log("w2:"+camera.viewfinder.resolution.width) //=> ok : highest resolution.width
console.log("h2:"+camera.viewfinder.resolution.height)//=> ok : highest resolution.height
camera.imageCapture.capture() // error : QCameraImageCapture error: "Camera not ready for capture"
camera.viewfinder.resolution.width = w;
console.log("w1:"+camera.viewfinder.resolution.width ) == > //output = qml: w1:-1
camera.viewfinder.resolution.height = h;
var w=camera.viewfinder.resolution.width;
console.log("w1:"+w) //=> low resolution.width
var h=camera.viewfinder.resolution.height;
setMaxResulotion();//set highest resolution
console.log("w2:"+camera.viewfinder.resolution.width) //=> ok : highest resolution.width
console.log("h2:"+camera.viewfinder.resolution.height)//=> ok : highest resolution.height
camera.imageCapture.capture() // error : QCameraImageCapture error: "Camera not ready for capture"
camera.viewfinder.resolution.width = w;
console.log("w1:"+camera.viewfinder.resolution.width ) == > //output = qml: w1:-1
camera.viewfinder.resolution.height = h;
To copy to clipboard, switch view to plain text mode
Bookmarks