QImage, load(), good for Debug, fail for Release
-
Hello,
I wrote:
@QImage myImage;
myImage.load( filePath );
@
It works in debug version for any image format. But it failed in release version for jpg image only and works for any other format.Please help. Thanks.
The image file in release version:
return true for isReadable();
return true for file.open( QIODevice::ReadWrite );
return false for myImage.load( filePath ) and myImage.load( &file, "jpg" );PC: Windows 7, 64-bits.
Thanks,
Yi
-
Is where imageformats folder with image plugins in folder where your executable is?
have compiled Qt by yourself? Have you configured it with plugin-manifests?
Are you using VS?Have read "Deploying Qt Applications":http://qt-project.org/doc/qt-4.8/deployment.html already?
-
Thanks very much for your reply.
Is where imageformats folder with image plugins in folder where your executable is?
No, they are not. In different folders.have compiled Qt by yourself? No, I haven't.
Have you configured it with plugin-manifests? No, I haven't.
Are you using VS? Yes, I am. VS2008
-
You should have following structure for working image plugins:
<your executable>
imageformat/qjpeg4.dll
imageformat/q..4.dllAlso, sometimes helps just to delete Qt's registry cache settings, etc...
Just delete this key, it will be regenerated again:
@HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults@ -
Thanks so much. The problems solved