Quote Originally Posted by wysota View Post
It will be crashing because you pass it invalid data. If you want to work on a corrupt image, it's best to do all the decoding yourself and then fill QImage with proper data manually.

First create an emtpy QImage object with a defined size and format (QImage::Format_Indexed8 will probably be best for a gif image).
Then fill the color table based on the data from the corrupt file.
Then fill pixel data either using QImage::setPixel or with QImage::bits() if you have the data in a proper format. The data needs to be formatted linearly and it should contain indexes of the color table. You can't just copy the data straight into the pixel buffer of QImage because GIF stores it compressed, so you need to decompress it first manually.
I m so confused, can u send some sample code for this... Can u tell me some easiest soltuin for this..
Our software will scan a lakh/multi thousand files and show the preveiw of all files one by one. So GIF or other files's preview process should be fast.

Is there any alternative or kind send some sample code for this
Thanks
Santosh