Unable to see images after deploymenmt .
-
I am using Qt for desktop ,I am able to compile and run the applications. I am getting problem with showing images, it is only showing png images, but not displaying jpeg and gif images all other.Can anyone tell how to solve this problem.
-
i had similar problems... i found that the only way was to use MS-Paint(or any other such program for that matter) to convert .jpeg and other formats to .png(there may be other ways but i didn't find them)
-
Probably image plugin issue, but without more data from you, I cannot say for sure. We need code samples, directory structure, platform info etc.
-
[quote author="sierdzio" date="1343045712"]Probably image plugin issue, but without more data from you, I cannot say for sure. We need code samples, directory structure, platform info etc.[/quote]
when i was searching for it, i found that the supported formats(for toolbutton icons, mainwindow icons, etc) were .png, .tiff, .jpg(jpeg doesn't work) and a few others i can't recall
-
I am using resource file named "resources.qrc".
In resource file I have given prefix "/resources/images" and using main.jpg as alias. But the original path is different. It is working for .png files but not working for .jpg@Image {
id: image1
width: parent.width
height: parent.height
fillMode: Image.Stretch
smooth: true
z: 0
opacity: 0.940
source: "qrc:///resources/images/main.jpg"
}@ -
Ah, QML. I had a similar issue, too. Reinstalling my system was the solution :P but that is not optimal. I'm almost certain Qt's image plugins are to be blamed, but I have no definite answer.
-
Hi!
You should deploy appropriate image formats plugins too from %QTDIR%/plugins/imageformats.
For jpeg in your case -
[quote author="AlekseyOk" date="1343047105"]Hi!
You should deploy appropriate image formats plugins too from %QTDIR%/plugins/imageformats.
For jpeg in your case[/quote]Thank you for this info... though could you tell how to find/compile the required files
-
See "this related thread":http://qt-project.org/forums/viewthread/17342 (its about another image plugin for .ico images, but it applies to your problem as well). The plugin libs can be found in the QTDIR/plugins/imageformats directory as mentioned before.
-
i am reading lots of images form disk those are having different format ,here i am unable to read all.because they all are randomly generated by other media resources and creating image named "Folder.jpg.pnj,etc".so converting image format is not the solution for me.
-
No need to convert image formats you just need to provide all the plugins for the different formats. Have a look in the QTDIR/plugins/imageformats folder the libs there cover pretty much all formats.
-
i am trying to add plugin to my project in main.cpp like
QString sDir = QCoreApplication::applicationDirPath();
app.addLibraryPath(sDir+"/plugins");and all base directory of plugin to the resource directory.
-
Hey, i checked the folder mentioned... gif, jpeg, ico and many other plugins are present, but (strangely) png is missing; and even stranger is that png is the only format working for me!?!? O.o
-
You should have folder imageformats from posted location in current application's folder (i.e. without 'plugins' as parent folder) without
@QString sDir = QCoreApplication::applicationDirPath(); app.addLibraryPath(sDir+”/plugins”);@ -
When your testing your application on your development PC the plugins are present (because you have you Qt SDK). When you deploy your application at a customer PC they probably won't have the Qt SDK installed so you need to provide all the dlls your application requires (e.g. QtGui.dll, QtCore.dll.. AND the image plugins). The image plugins need to be present in the following way: YourProgramsInstallationFolder/plugins/imageformats/qjpeg.dll .....