Results 1 to 3 of 3

Thread: QImage->save(); returns 0

  1. #1
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QImage->save(); returns 0

    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.

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QImage->save(); returns 0

    you need to put that file into the imageformats subdirectory

    /test.exe
    /imageformats/qjpeg4.dll


    Joh

  3. The following user says thank you to JohannesMunk for this useful post:

    ramzes13 (22nd September 2010)

  4. #3
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QImage->save(); returns 0

    Quote Originally Posted by JohannesMunk View Post
    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

Similar Threads

  1. Qimage::save returns false in release
    By CCTeam in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2010, 17:35
  2. Can't save QImage
    By hvengel in forum Qt Programming
    Replies: 6
    Last Post: 14th June 2008, 21:07
  3. How can I save a QImage object into a SQLite3 database table?
    By danielperaza in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2008, 05:39
  4. QImage : trouble with save() method
    By krivenok in forum Qt Programming
    Replies: 12
    Last Post: 3rd May 2006, 20:55
  5. Replies: 3
    Last Post: 15th March 2006, 11:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.