QImage::load() returning NULL in embedded qt
-
Hi,
I am trying to load a BMP image on an ARM platform. QImage::load() works well on my host for a sample program., but the same program when run on ARM gives NULL. Any suggestion what could be wrong here?
I have two separate copies of Qt. One configured for amd_64(host) and the other configured as embedded for ARM platform(for cross compiling).
Thanks,
Kevin -
Hi and welcome to devnet,
Did you check that the arm version has all plugins (specially imageformats) deployed properly ?
-
Thanks for the reply.
Sorry, how can I check if the imageformats are properly deployed or not? I have disabled almost all the image supports using -no-libpng etc and I am using -prefix-install for a local build.
Are the image libraries like say libqjpeg.so need to be deployed on the ARM platform if I want to load a BMP image?
-Kevin
-
You should find them in the plugins/imageformats folder from your Qt installation
-
Yes, I can see certain .so files specific to various image files like libqjpeg.so in my embedded Qt build. But are those necessary for a BMP file? I cannot find say, libqbmp.so in plugins/imageformats folder. Is there any particular flag which I should pass explicitly to configure qt to support BMP?
-
Hi,
Any ideas?
If I copy the plugin folder to my arm platform(from embedded-arm build) and change the QT_PLUGIN_PATH; will that solve the issue?As I have said I am using a BMP image file. I can try loading a JPEG image using libqjpeg.so. But still what is the right way to load a BMP file?
Thanks,
Kevin -
Just had a silly idea: what path are you using to get the image ? Are you sure the file is there ?
-
I am using the path "/mnt/<image>.bmp". Both the application and the image are on a pendrive(FAT32). I mount the pendrive on my target platform at "/mnt" and run it from there.
Even tried using only "<image>.bmp" as the path since both the application and the image are in the same location; but load() returned NULL. :(
-
So you have read access to image.bmp ?
-
I think my embedded build qconfig had the macro QT_NO_IMAGEFORMAT_BMP defined. Trying to build the Qt libraries after undefining the macro.