summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-07 17:28:25 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-03 07:41:56 +0000
commit989b9da3007ff06c79ab7ee553acfce9177df5b6 (patch)
tree1fc65836ff484409c74348f3283a5370d1b90829 /tests/auto/gui/image
parented1373124a55d41a8e7b5c123428f2a088d25896 (diff)
Fix BMP ImageFormat for semi-transparent files
Reads the v4 and v5 info-header together with the rest of the info- headers, and use that to report the correct image format before decoding. Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 574ad805ca..a908e06498 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -519,7 +519,7 @@ void tst_QImageReader::imageFormat_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8;
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
- QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp") << QImage::Format_ARGB32;
QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
@@ -736,7 +736,6 @@ void tst_QImageReader::imageFormatBeforeRead()
QSize size = reader.size();
QImage image(size, fileFormat);
QVERIFY(reader.read(&image));
- QEXPECT_FAIL("bmp-3", "Semi-transparent BMPs not predicted", Continue);
QCOMPARE(image.format(), fileFormat);
}
}