QML Image: Unable to read image data.
-
wrote on 30 Mar 2020, 14:20 last edited by
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? -
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.
-
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.
wrote on 30 Mar 2020, 14:39 last edited by@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.
-
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 ? -
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.
wrote on 30 Mar 2020, 14:41 last edited by@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?
-
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 ?
-
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 ?
1/7