meta-qt5 not executing animated image (gif) file
-
Hi All,
I have build a Yocto Image (dunfell version 3.1.9) and trying to run the image on the raspberry pi model B. The sample Qt Gui which I build using Qt Kit 5.14.0 on my windows 10 machine contains some Sequential animation, Parallel Animation and AnimatedImage works fine without any issue.
But on the Raspberry Pi, I don't see the AnimatedImage getting executed.
I am not familiar with the required plugins required to run the AnimatedImage.
I have used the below RDEPENDS on my recipes,SUMMARY = "Minimal set of Qt packages needed for QML apps" inherit packagegroup RDEPENDS_${PN} = " \ fontconfig \ ttf-bitstream-vera \ qtbase \ qtbase-plugins \ qtdeclarative \ qtdeclarative-qmlplugins \ qtquickcontrols2 \ qtgraphicaleffects \ qtimageformats \ qtmultimedia \ "
Could someone help me if I need to add any additional packages?
My CMakeLists.txtcmake_minimum_required(VERSION 3.5) project(sampleqtgui) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) #set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/staging) #set(CMAKE_VERBOSE_MAKEFILE false) add_executable(${PROJECT_NAME} main.cpp qml.qrc main.qml ) find_package(Qt5Core) find_package(Qt5Gui) find_package(Qt5Qml) find_package(Qt5Quick) find_package(Qt5Multimedia) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Multimedia ) install( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin COMPONENT runtime )
main.qml
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.3 Window { id: window width: 800 height: 480 visible: true color: "#000000" title: qsTr("sampleqtgui") //flags: Qt.Window | Qt.FramelessWindowHint Item { id: mainWindow width: 800 height: 480 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter Rectangle { id:splashScrn width: parent.width; height: parent.height color: "#000000" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter AnimatedImage { id: animation; anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; source: "qrc:/images/loading.gif";} } } }
The below gif image is NOT displayed on the raspberry pi.
-Thanks in advance.
-
Hi and welcome to devnet,
You should check the imageformats folder to see which plugins have been built.
You can also print a least of the supported image formats using QImageReader::supportedImageFormats.
-
@SGaist said in meta-qt5 not executing animated image (gif) file:
imageformats folder
I could only see libqicns.so, libqjpeg.so, libqtga.so, libqtiff.so, libqwbmp.so, libqwebp.so files inside /usr/lib/plugins/imageformats folder.
Is there any libraries missing for AnimatedImage/gif file handling? If so how do I include to my recipes.
-
There's likely libgif missing.
-
@SGaist I couldn't find libgif.so file anywhere. Can you help me to build/install those packages?
As a workaround, I converted the .gif file to .webp format as libqwebq.so plugin was available, but after first execution, the application started to flicker when running on the raspberry pi.I am using eglfs, should I need to change to weston-wayland display compositor?
-
Can you pass the -qt-gif parameter to your recipe when building Qt ?
-
@SGaist said in meta-qt5 not executing animated image (gif) file:
-qt-gif
bitbake sampleqtgui-image -qt-gif Usage: bitbake [options] [recipename/target recipe:do_task ...] Executes the specified task (default is 'build') for a given set of target recipes (.bb files). It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which will provide the layer, BBFILES and other configuration information. bitbake: error: no such option: -t
Should I need to modify the recipes for accepting '-qt-gif' parameter??
-
That parameter should be added to the Qt recipe.