Fix decoding of JPEGs with invalid EXIF headers

We should accept JPEGs with broken EXIF headers since the header is
optional and can be ignored if broken.

Task-number: QTBUG-46870
Change-Id: I494e5497b8449ce6494285d4d77caadbbb0ccaf8
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
This commit is contained in:
Allan Sandfeld Jensen 2015-06-26 15:42:49 +02:00
parent 7d5e849e28
commit fdef1dc7fe

View File

@ -929,8 +929,6 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device)
if (!exifData.isEmpty()) {
// Exif data present
int exifOrientation = getExifOrientation(exifData);
if (exifOrientation == -1)
return false;
if (exifOrientation > 0)
transformation = exif2Qt(exifOrientation);
}