Solved Qt JPEG dependency
-
Hi,
I am developing a basic application that loads images with different formats and displays them in a QGraphicsView object. The code is very simple and its available at: https://github.com/xtingray/image.test/blob/master/mainwindow.cppThe application works perfectly in my Windows system using JPEG and PNG files. In fact, I created a zip file with the application deployment: http://maefloresta.com/tmp/win/image.zip
That zip file contains these components:
- image.exe
- platforms/qwindows.dll
- Qt5Core.dll
- Qt5Gui.dll
- Qt5Widgets.dll
Now, this is my problem: if I try to run my application from any Windows system without Qt previously installed, I can't display JPEG files. Although my program doesn't crash, the JPEG image never is displayed. The QPixmap object can't load the image file neither using the constructor or the methods load() / loadFromData(). With PNG files everything works perfectly.
My first guess is that I am missing some kind of DLL dependency related to the JPEG format, so I installed the Dependency Walker tool to find out the missing library, but no warning record is reported. By the way, the Qt installer I am using is this: qt-5.5.0-x64-mingw510r0-sjlj-rev0.exe
I appreciate any comment/suggestion about this issue. Thanks!
-
@xtingray said:
JPEG
You are missing plugins/imageformats. See:
http://doc.qt.io/qt-5/qtimageformats-index.html
http://doc.qt.io/qt-5/deployment-plugins.html -
@alex_malyu said:
You are missing plugins/imageformats.
@alex_malyu is right. Here's a diagram that shows where qjpeg.dll should go: