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. meta-qt5 not executing animated image (gif) file
Forum Updated to NodeBB v4.3 + New Features

meta-qt5 not executing animated image (gif) file

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 2 Posters 1.7k Views 1 Watching
  • 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.
  • Y Offline
    Y Offline
    yuva
    wrote on last edited by
    #1

    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.txt

    cmake_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.

    loading.gif

    -Thanks in advance.

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

      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.

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

      Y 1 Reply Last reply
      0
      • SGaistS SGaist

        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.

        Y Offline
        Y Offline
        yuva
        wrote on last edited by yuva
        #3

        @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.

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

          There's likely libgif missing.

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

          Y 1 Reply Last reply
          0
          • SGaistS SGaist

            There's likely libgif missing.

            Y Offline
            Y Offline
            yuva
            wrote on last edited by
            #5

            @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?

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

              Can you pass the -qt-gif parameter to your recipe when building Qt ?

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

              Y 1 Reply Last reply
              0
              • SGaistS SGaist

                Can you pass the -qt-gif parameter to your recipe when building Qt ?

                Y Offline
                Y Offline
                yuva
                wrote on last edited by
                #7

                @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??

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

                  That parameter should be added to the Qt recipe.

                  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

                  • Login

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