Hi,

I am using QImage to scale and save images downloaded from the net using QNetworkAccessManager.

99.9% of the images can be saved correctly but for a very small fraction of images I get the following error/warning messages printed on the console:

Corrupt JPEG data: premature end of data segment
or
Corrupt JPEG data: 164 extraneous bytes before marker 0xd9

I would be interested in catching those errors and discarding the corresponding images. I wonder if anyone knows a way to do this? QImage::loadFromData() returns true even for images that produce those error messages.

Thanks,
mikeee7