Qt 5.3 iOS Wrong JPEG library version
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
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?
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.
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.
can you please share the information on how have you compiled OpenCV with libjpeg-turbo?
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
I'm compiling now with those CMAKE switches.
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?
I used the 2.4.9 and seams I deleted the libjpg from the 3party folder before compilation.
Hey, that worked.