Save Image in XML file
Solved
QML and Qt Quick
-
Hi,
I want to get image from camera and save to XML file.
I pass "photoPreview.source (== image://camera/preview_1)" as URL of captured image to c++ class.
I have this error:
"Open error"
How can I get URL of captured image by camera? (URL of photoPreview.source)QFile fileImg(url_image); // == > photoPreview.source (== image://camera/preview_1) fileImg.open(QIODevice::ReadOnly); QByteArray imageData = fileImg.readAll(); QByteArray imageData_Base64 = imageData.toBase64(); xmlWriter.writeAttribute("image",imageData_Base64);
-
Hi,
You need to use the capturedImagePath in order to get the file corresponding to your captured image.