Unable to load GIFs in Qt on Hardware, works in QtCreator

Hello,

I am running the oecore angstrom-qt5-x11-image on my Toradex Apalis-tk1. I have developed a Qt5 application thats works correctly in my Ubuntu host environment with viewable GIFs in the application. However when I run the application on my Toradex, everything is functional, except I get a could not load GIF error (returns invalid in Qt).
Is there a driver/library that I am missing on the Toradex? It is able to run fine, and does not give any error about a missing Qt library at run time.
Additionally, since this is using an older version of Qt (5.9.7), I cannot use the lastErrorString() Qt function to get more information on why it failed to load.

Let me know if you have any questions and thank you in advance for the help!

-Josh

Greetings!

Hmm it’s hard to even speculate what could be wrong given such little details. My initial though would be to check what Qt libraries/packages are used by your GIF application. Then check if these libraries are included on the system. While a large portion of generic Qt libraries are included in that specific image I believe there’s still some niche Qt libraries that are missing/not included. Another possibility is there might be a version mismatch with one of the libraries.

Again these are just speculations given the little details.

Best Regards,
Jeremias

Hello!

I did some more researching and found out that when running my Qt application on my host desktop using the QMovie::supportedFormats(), I get supported formats: (“gif”, “webp”).

When running on my Toradex, I return an empty list after running the same command.

Looking into /usr/lib/qt5/plugins/imageformats on my Toradex, there is no libqgif.so file present, which is probably the cause of my issue.

Is this file present in the oe-core package and if so do you know where I would be able to find it?
If not is there a reliable location to download the file?

Thank you,
Josh

After some more hunting, I found a binary for the library based on this other link:
https://forum.qt.io/topic/20271/solved-qmovie-not-working-in-arm-platform/16

This will work for now, and I think the fix in the yocto side should be a 1 line addition to the config file, but I will figure that out later.

Thanks for the help!

Josh

No problem, glad you were able to work something out!

Best Regards,
Jeremias

I’m not too familiar with specific Qt libraries. On quick search I couldn’t find any details of any oe/yocto packages that provide this library. Though this library may be installed implicitly as part of a larger Qt package.

The most straightforward way would be to inquire Qt about which OE recipe/package installs this library. It may also work to download an arm binary of this library though I’m not sure where you could download such. Also I wouldn’t recommend this way since installing a single library via binary like this can be messy versus a proper integration with oe/yocto.

Best Regards,
Jeremias

Hi Josh
I am also facing this kind of issue with torizon 5.1 with wayland multimedia image(iMX6DL).
If you have work out to add some line in local.conf for this issue kindly revert

Regards
DeepaK

Hi @deepakrajpoot,

Are you sure you’re using Torizon? Or are you using the multimedia reference image? These are different.

@Josh
Could you please share your solution if possible.

Best Regards,
Jeremias

Hello jeremias.tx
thanks for reply. I am using multimedia reference image (TDX Wayland with XWayland 5.2.0-devel-20210317095952+build.0 (dunfell) colibri-imx6 ttymxc0
Colibri-iMX6_Reference-Multimedia-Image
)which i have prepared through bitbake. But i am not able to play GIF in this image. I had old image with 2.74 lxde, on this image GIF was working good. Please suggest how i can cater it.

Hmm I’m not too familiar here. But is this the same issue as the original question of this thread? Where it’s a GIF that’s not playing in Qt? Or is this a GIF without Qt? What kind of error do you get when trying to play the GIF in the new software?