Results 1 to 3 of 3

Thread: QImage crash when the format is "Format_Indexed8"

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QImage crash when the format is "Format_Indexed8"

    os : win7 64bits
    compiler : mingw4.6.2
    qt version : qt4.8.1(the dll and and the lib haven't rebuild by mingw4.6.2)

    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include <QtGui/QImage>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication a(argc, argv);
    7.  
    8. QImage src("../GIL_with_Qt/images_00/lena/lena.jpg");
    9. src = src.convertToFormat(QImage::Format(3) );
    10. QImage dst(src.size(), src.format());
    11.  
    12. dst.save("E:/lena/lena_Format_Indexed8.jpg");
    13. return a.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 

    This will cause the program crash, what kind of mistake do I make?
    Thank you very much
    Attached Images Attached Images

Similar Threads

  1. Replies: 0
    Last Post: 21st September 2011, 18:59
  2. QProgressBar "crash" - doesn't work properly
    By metRo_ in forum Qt Programming
    Replies: 6
    Last Post: 23rd October 2010, 13:56
  3. QImage::scaled cause "raster"/"grid"
    By wesley in forum Qt Programming
    Replies: 24
    Last Post: 26th April 2010, 09:42
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. QDrag setPixmap failed with "XBM" format
    By alfa_wu in forum Qt Programming
    Replies: 2
    Last Post: 2nd May 2007, 02:32

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.