Set image for qml camera from c++
Solved
QML and Qt Quick
-
Hi,
I convert image of camera to base64 string.QFile fileImg(url of image); // == camera.imageCapture.capturedImagePath fileImg.open(QIODevice::ReadOnly); QByteArray imageData = fileImg.readAll(); QByteArray imageData_Base64 = imageData.toBase64(); xmlWriter.writeAttribute("image",imageData_Base64);
I have a string like this:
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA ......Now I want show above string as image in qml camera.
Please guide me.
-
Hi,
Do you mean you would like to show the preview of the image you captured ?