PDA

View Full Version : QImage->save(); returns 0



ramzes13
21st September 2010, 16:34
Hi All,
I have a problem when saving QImage.
When I compile my program in release mode and take it to another computer
Function: QImage->save(image_name, "JPEG", 100)
returns 0
However, on my computer everything is fine.
Copying jpeg Qt dlls: qjpeg4.dll and qjpegd4.dll in the folder with executable file did not help.

I am using Qt Creator 2.0.0 based on Qt 4.7.0 (32 bit) (WindowsXP)


Does anybody know what is the problem?

Thank you.

JohannesMunk
21st September 2010, 17:05
you need to put that file into the imageformats subdirectory

/test.exe
/imageformats/qjpeg4.dll

Joh

ramzes13
22nd September 2010, 15:49
you need to put that file into the imageformats subdirectory

/test.exe
/imageformats/qjpeg4.dll

Joh

Thank you for your reply.
This fixes the problem