Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QImage::load() returning NULL in embedded qt
Forum Updated to NodeBB v4.3 + New Features

QImage::load() returning NULL in embedded qt

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 2 Posters 2.8k Views 2 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.
  • K Offline
    K Offline
    kevinjjames
    wrote on last edited by kevinjjames
    #1

    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

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

      Hi and welcome to devnet,

      Did you check that the arm version has all plugins (specially imageformats) deployed properly ?

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

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Did you check that the arm version has all plugins (specially imageformats) deployed properly ?

        K Offline
        K Offline
        kevinjjames
        wrote on last edited by
        #3

        @SGaist

        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

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

          You should find them in the plugins/imageformats folder from your Qt installation

          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
          • K Offline
            K Offline
            kevinjjames
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kevinjjames
              wrote on last edited by
              #6

              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

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

                Just had a silly idea: what path are you using to get the image ? Are you sure the file is there ?

                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
                • K Offline
                  K Offline
                  kevinjjames
                  wrote on last edited by kevinjjames
                  #8

                  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. :(

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

                    So you have read access to image.bmp ?

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

                    K 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      So you have read access to image.bmp ?

                      K Offline
                      K Offline
                      kevinjjames
                      wrote on last edited by
                      #10

                      @SGaist

                      I think my embedded build qconfig had the macro QT_NO_IMAGEFORMAT_BMP defined. Trying to build the Qt libraries after undefining the macro.

                      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