Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QML Image: Error decoding: data:image/jpeg;base64,

    QML and Qt Quick
    2
    3
    528
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      steinito last edited by

      Hi,

      I have a qml application running in windows 10, build with mingw with 5.15.2.
      A part of the application has a QML Image object that takes a base64 string as an image source.
      The base 64 string is on the form "data:image/jpeg;base64,/9j/4 ......and a looooong string that follows after this.
      The string has also been tested in many online base64 converters and it is indeed the image I have encoded.
      The application runs fine in my build environment, I build the Makefile with cmake -G "MinGW Makefiles", and build the application with the "mingw32-make -j12" command.
      The issue is that I cannot get this to work on a target PC I deploy the application to.
      I deploy it using the windeployqt tool, and the entire application runs as expected, but when I try to load these base64 strings as sources for my QML Image objects, I get the
      "QML Image: Error decoding: data:image/jpeg;base64,<rest of the base64 string>" error code.

      Any idea what I can do to fix this?

      S 1 Reply Last reply Reply Quote 0
      • S
        steinito @steinito last edited by

        I have also tried removing the "data:image/jpeg;base64," part of the base64 string, but then I get this error: "QML Image: Cannot open: qrc:"

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          Can you explain exactly what you did to deploy your application ?

          Does it run successfully on your machine outside of Qt Creator once you deployed it ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • First post
            Last post