Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.5.0
-
None
Description
Damaged JPEG image are loaded without error. It is not possible to know if an image has been correcly loaded. The only error is the following message in the console:
"Corrupt JPEG data: premature end of data segment".
To reproduce the problem, load the attached image with the following code:
include <QtGui>
int main(int argc, char **argv){
QApplication app(argc, argv);
QImage image;
qDebug() << image.load("image.jpg");
QImageReader imageReader("image.jpg");
QImage image2 = imageReader.read();
qDebug() << imageReader.errorString();
return 0;
}
It would be nice to have a way to specify if the QImageIOHandler should fail or not when the data is corrupted.
Attachments
Issue Links
- relates to
-
QTBUG-92807 QImageReader not reporting corrupt JPEG images correctly
-
- Closed
-