Save Image in XML file

  • 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)
            QByteArray imageData = fileImg.readAll();
            QByteArray imageData_Base64 = imageData.toBase64();

  • Lifetime Qt Champion


    You need to use the capturedImagePath in order to get the file corresponding to your captured image.

Log in to reply