I'm trying to capture an Image using QT, and write the image buffer into an object of the QBuffer class instead of saving it to a file.
This is my code so far:
mBuffer->open(QBuffer::ReadWrite);
mCameraImageCapture->setCaptureDestination(QCameraImageCapture::CaptureToBuffer);
QImageEncoderSettings imageEncoderSettings;
imageEncoderSettings.setCodec("image/BMP");
mCameraImageCapture->setEncodingSettings(imageEncoderSettings);
mCamera->setCaptureMode(QCamera :: CaptureStillImage);
mCamera->start();
mCamera->searchAndLock();
mCamera->unlock();
mBuffer->close();
Is it possible to capture the image into a buffer without saving it to file?