Results 1 to 4 of 4

Thread: QImage rotate for tiff images

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QImage rotate for tiff images

    I used the following code to rotate and flip. I find huge data loss in .tiff and .jpeg images of larger size.

    Is there any approach in QT or any other external QT/ C++ library to over come the issue.


    ////////rotate/////////
    Qt Code:
    1. QImage myImage(currentFile);
    2. QTransform myTransform;
    3. myTransform.rotate(90);
    4. myImage = myImage.transformed(myTransform);
    5.  
    6. bool ret = myImage.save(currentFile);
    To copy to clipboard, switch view to plain text mode 
    ////////////////flip////////////
    Qt Code:
    1. QImage myImage(currentFile);
    2. myImage = myImage.mirrored();
    3. bool ret = myImage.save(currentFile);
    To copy to clipboard, switch view to plain text mode 

    thank you
    Last edited by wysota; 16th June 2011 at 11:51. Reason: missing [code] tags

Similar Threads

  1. Loading corrupt jpeg images with QImage
    By mikeee7 in forum Qt Programming
    Replies: 15
    Last Post: 3rd December 2010, 01:59
  2. Pass remote (web) images to QImage
    By NicholasSmith in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2009, 22:00
  3. Replies: 4
    Last Post: 27th July 2009, 15:45
  4. Writing Images using QImage from 2D Array
    By kaydknight in forum Qt Programming
    Replies: 1
    Last Post: 29th December 2007, 03:06
  5. Tiff in unsigned short
    By spawnwj in forum Qt Programming
    Replies: 14
    Last Post: 26th July 2006, 07:41

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.