Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Image: Unable to read image data.
QtWS25 Last Chance

QML Image: Unable to read image data.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 2 Posters 1.4k Views
  • 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.
  • MikhailGM Offline
    MikhailGM Offline
    MikhailG
    wrote on last edited by
    #1

    Hello! Trying to load an image with QML Image but it fails - Unable to read image data. Error decoding: file:///C:/Users/user1/OneDrive/Pictures/1.jpg:
    The size of the image is 26mb. Does qml image support images with such size?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The first thing I would try is to move the file to the hard drive of your computer. I am not sure whether the fact that it is stored in your OneDrive share does come into play.

      Note that if you have a high quality image that is already 26Mb heavy, it will require quite a lot of space to uncompress to display. It could be another factor but I would first check whether it's related to OneDrive.

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

      MikhailGM 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        The first thing I would try is to move the file to the hard drive of your computer. I am not sure whether the fact that it is stored in your OneDrive share does come into play.

        Note that if you have a high quality image that is already 26Mb heavy, it will require quite a lot of space to uncompress to display. It could be another factor but I would first check whether it's related to OneDrive.

        MikhailGM Offline
        MikhailGM Offline
        MikhailG
        wrote on last edited by
        #3

        @SGaist said in QML Image: Unable to read image data.:

        but I would first check whether it's related to OneDrive

        Have checked, no OneDrive related. Images with lower size are load with no issues. Also moved the problem image on to Desktop - same problem.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What kind of image is that ?
          Can you open it with an image viewer ?
          Can you try to show it in a C++ application on a QLabel ?

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

          MikhailGM 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            The first thing I would try is to move the file to the hard drive of your computer. I am not sure whether the fact that it is stored in your OneDrive share does come into play.

            Note that if you have a high quality image that is already 26Mb heavy, it will require quite a lot of space to uncompress to display. It could be another factor but I would first check whether it's related to OneDrive.

            MikhailGM Offline
            MikhailGM Offline
            MikhailG
            wrote on last edited by
            #5

            @SGaist said in QML Image: Unable to read image data.:

            require quite a lot of space to uncompress to display

            Ok, may be the case, but how can I proceed such case?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              One way would be to load a reduced version of your image.

              What are you using it for ?

              You should also check the place it takes. Like I already wrote, can you show it in a QLabel ? Or maybe a better first step, load it in a QImage to have an idea of the space it needs before trying to show it.

              By the way, what are your machine specifications ?

              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
              0
              • SGaistS SGaist

                What kind of image is that ?
                Can you open it with an image viewer ?
                Can you try to show it in a C++ application on a QLabel ?

                MikhailGM Offline
                MikhailGM Offline
                MikhailG
                wrote on last edited by
                #7

                @SGaist you were right, the image had wrong extension! Everything seems okay for now.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved