Results 1 to 12 of 12

Thread: loadFromData() of QImage crash in case of .gif loading

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default loadFromData() of QImage crash in case of .gif loading

    HI
    I m using Qt 4.4.3 on Windows. I m using loadfromData function of QImage.
    But sometimes it crashes while loading .gif files.

    Sample code for this:

    unsigned char *qBuffer= new unsigned char[SizeToRead-BytesToIgnore];
    memset(qBuffer,0x00,SizeToRead-BytesToIgnore);
    memcpy(qBuffer,(const void*)&pBuff[BytesToIgnore],SizeToRead-BytesToIgnore);
    QImage image;
    image.loadFromData(qBuffer,(SizeToRead-BytesToIgnore));//Load Image from the UChar * array qbuffer


    Crash happens in image.loadFromData(qBuffer,(SizeToRead-BytesToIgnore)); for corrupt gif image.

    Collect the Call Stack of Crash from Attachment.

    Kindly tell me solution.



    Thanks
    Attached Files Attached Files

Similar Threads

  1. loadFromData() of QImage -crash in case of .gif loading
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2011, 11:56
  2. Loading a raw image into QImage
    By Luc4 in forum Qt Programming
    Replies: 6
    Last Post: 16th May 2010, 15:20
  3. QImage loadFromData
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2008, 18:57
  4. QImage::loadFromData() behaviour
    By Caius Aérobus in forum Qt Programming
    Replies: 10
    Last Post: 29th November 2007, 21:21
  5. QImage loadFromData not run... XPDF data
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2007, 11:51

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.