QCameraImageCapture save image to file
-
Hi
I use QCameraImageCaptureMainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ... cameraImageCapture = new QCameraImageCapture(camera); cameraImageCapture->setCaptureDestination(QCameraImageCapture::CaptureToBuffer); connect(cameraImageCapture,SIGNAL(imageCaptured(int,QImage)),this,SLOT(imageCapture(int,QImage))); } void MainWindow::on_buttonTakePhoto_clicked() { camera->start(); camera->searchAndLock(); cameraImageCapture->capture(); camera->unlock(); camera->stop(); }This code save image to file, even though it is set differently.
Where is problem?
-
Hi and welcome to devnet,
What is your problem in the first place ? The code looks it's working.
-
Hi and welcome to devnet,
What is your problem in the first place ? The code looks it's working.
-
What version of Qt ? On what OS ? How did you diagnose that ?
-
-
Did you check that the capture destination was supported ? You can do that using isCaptureDestinationSupported.
-
Did you check that the capture destination was supported ? You can do that using isCaptureDestinationSupported.