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. Qt 5.3 iOS Wrong JPEG library version
Forum Updated to NodeBB v4.3 + New Features

Qt 5.3 iOS Wrong JPEG library version

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 3 Posters 5.1k 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.
  • H Offline
    H Offline
    hubaiz
    wrote on last edited by
    #1

    QImage loads the JPG image that is located in the application Documents folder.
    If I include the OpenCV iOS framework then the QImage JPG load fails with the following debug message:
    Wrong JPEG library version: library is 62, caller expects 80

    I will get this error if I include the following in the application .pro file:
    LIBS += -F /opt/opencv
    -framework opencv2

    I also tested with the libjpeg-turbo library with same result. It is enough just to include the library and the QImage will report the above error.

    Is there a workaround for this problem or I'm doing something wrong?

    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 are probably overwriting Qt's jpeg library with the one used by e.g. OpenCV that seems to bit older.

      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
      • H Offline
        H Offline
        hubaiz
        wrote on last edited by
        #3

        Yep I suspected that is the problem. Seams that OpenCV is compiled with libjpeg V62.
        Now I took the OpenCV source and compiled it with libjpeg-turbo that was compiled with libjpeg V80. QImage now loads the jpg file even after I include the OpenCV framework. Didn't try yet OpenCV jpg loading.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          che1404
          wrote on last edited by
          #4

          Hi hubaiz,
          can you please share the information on how have you compiled OpenCV with libjpeg-turbo?

          Thanks!

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hubaiz
            wrote on last edited by
            #5

            I'm not remembering the exact steps but seams I did the following
            Followed this: http://docs.opencv.org/doc/tutorials/introduction/ios_install/ios_install.html

            Then used the info from here: http://stackoverflow.com/questions/10465209/how-to-compile-opencv-with-libjpeg-turbo

            and modified the build_framwork.py

            1 Reply Last reply
            0
            • C Offline
              C Offline
              che1404
              wrote on last edited by
              #6

              Hey,
              I'm compiling now with those CMAKE switches.
              Thanks!

              1 Reply Last reply
              0
              • C Offline
                C Offline
                che1404
                wrote on last edited by
                #7

                Hi again,
                I have altered the build_framework.py to include those CMAKE switches, and it does compile, but in the install step, it tries to include into libopencv_world.a (a kind of universal lib containing all the symbols of the framework) also the jpeg object files, in spite of not having compiled jpeg. Obviously, this command fails for every jpeg object file that cannot find.
                I'm trying with OpenCV 2.4.7, and also with 2.4.8. I'm going to try now with the master branch.

                Did you face this problem?

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hubaiz
                  wrote on last edited by
                  #8

                  I used the 2.4.9 and seams I deleted the libjpg from the 3party folder before compilation.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    che1404
                    wrote on last edited by
                    #9

                    Hey, that worked.
                    Thanks!

                    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