Results 1 to 5 of 5

Thread: Saving image fails on other machines

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    30
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Saving image fails on other machines

    Try removing the format from the save call, and letting Qt figure it out on its own:

    Qt Code:
    1. image->save("test.jpg");
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to grabalon for this useful post:

    27Loco (28th July 2010)

  3. #2
    Join Date
    Apr 2009
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: Saving image fails on other machines

    Doesnt work either.

    I activated the console and now I got some more information about the problem. This is what I get when I am trying to save the image.
    Qt Code:
    1. QPainter::begin: Paint device returned engine == 0, type: 3;
    2. QPainter::save: Painter not active
    3. QPainter::setClipRect: Painter not active
    4. QPainter::restore: Unbelanced save/restore
    5. .
    6. .
    7. .
    8. .
    9. QPainter::end: Painter not active, aborted
    To copy to clipboard, switch view to plain text mode 

    SOLVED
    rect.size().toSize() was the problem. The size was not valid and therefore the image was invalid. So many hours

    Thanks for your help
    Last edited by 27Loco; 28th July 2010 at 19:12.

Similar Threads

  1. Problem saving JPG image
    By avis_phoenix in forum Newbie
    Replies: 1
    Last Post: 31st July 2009, 15:38
  2. Saving qwt plot as image
    By giusepped in forum Qwt
    Replies: 13
    Last Post: 14th July 2009, 07:39
  3. Regarding saving of image in QTOPIA sdk
    By prajna in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd April 2009, 06:45
  4. Saving QGraphicsScene with OpenGL to image
    By elbaschid in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2009, 20:32
  5. Saving already opened image ...
    By Godlike in forum Newbie
    Replies: 14
    Last Post: 28th March 2006, 21:17

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
  •  
Qt is a trademark of The Qt Company.