diff options
author | Ilya Konkov <eruart@gmail.com> | 2011-07-22 11:25:46 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-07-22 11:51:11 (GMT) |
commit | a237c2cacec31e1aef00ff4e0b5707efc52d9b31 (patch) | |
tree | 6372abfa39ec0065b65f1c321e734592391be2ac /tests | |
parent | 8ed1f02c0ca4626ddb2e9262aad4459ff3474630 (diff) | |
download | Qt-a237c2cacec31e1aef00ff4e0b5707efc52d9b31.zip Qt-a237c2cacec31e1aef00ff4e0b5707efc52d9b31.tar.gz Qt-a237c2cacec31e1aef00ff4e0b5707efc52d9b31.tar.bz2 |
Add initial support for bitmap version 4/5 headers.
The headers are just skipped, information stored in them is ignored.
Merge-request: 824
Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qimagereader/images/test32bfv4.bmp | bin | 0 -> 232874 bytes | |||
-rw-r--r-- | tests/auto/qimagereader/images/test32v5.bmp | bin | 0 -> 174858 bytes | |||
-rw-r--r-- | tests/auto/qimagereader/qimagereader.qrc | 2 | ||||
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 22 |
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qimagereader/images/test32bfv4.bmp b/tests/auto/qimagereader/images/test32bfv4.bmp Binary files differnew file mode 100644 index 0000000..3706037 --- /dev/null +++ b/tests/auto/qimagereader/images/test32bfv4.bmp diff --git a/tests/auto/qimagereader/images/test32v5.bmp b/tests/auto/qimagereader/images/test32v5.bmp Binary files differnew file mode 100644 index 0000000..8ad3cfa --- /dev/null +++ b/tests/auto/qimagereader/images/test32v5.bmp diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 632b73a..2c70652 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -42,6 +42,8 @@ <file>images/teapot.ppm</file> <file>images/test.ppm</file> <file>images/test.xpm</file> + <file>images/test32bfv4.bmp</file> + <file>images/test32v5.bmp</file> <file>images/tst7.bmp</file> <file>images/tst7.png</file> <file>images/transparent.xpm</file> diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 5c65cb3..5d958d7 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -234,6 +234,8 @@ void tst_QImageReader::readImage_data() QTest::newRow("empty") << QString() << false << QByteArray(); QTest::newRow("BMP: colorful") << QString("colorful.bmp") << true << QByteArray("bmp"); + QTest::newRow("BMP: test32bfv4") << QString("test32bfv4.bmp") << true << QByteArray("bmp"); + QTest::newRow("BMP: test32v5") << QString("test32v5.bmp") << true << QByteArray("bmp"); QTest::newRow("BMP: font") << QString("font.bmp") << true << QByteArray("bmp"); QTest::newRow("BMP: signed char") << QString("crash-signed-char.bmp") << true << QByteArray("bmp"); QTest::newRow("BMP: 4bpp RLE") << QString("4bpp-rle.bmp") << true << QByteArray("bmp"); @@ -432,6 +434,8 @@ void tst_QImageReader::setClipRect_data() QTest::addColumn<QRect>("newRect"); QTest::addColumn<QByteArray>("format"); QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: test32bfv4") << "test32bfv4" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: test32v5") << "test32v5" << QRect(0, 0, 50, 50) << QByteArray("bmp"); QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); QTest::newRow("BMP: 4bpp uncompressed") << "tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp"); QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); @@ -484,6 +488,8 @@ void tst_QImageReader::setScaledClipRect_data() QTest::addColumn<QByteArray>("format"); QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: test32bfv4") << "test32bfv4" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: test32v5") << "test32v5" << QRect(0, 0, 50, 50) << QByteArray("bmp"); QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png"); @@ -555,6 +561,8 @@ 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-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; QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng") << QImage::Format_Invalid; @@ -684,6 +692,8 @@ void tst_QImageReader::supportsAnimation_data() QTest::newRow("BMP: colorful") << QString("colorful.bmp") << false; QTest::newRow("BMP: font") << QString("font.bmp") << false; QTest::newRow("BMP: signed char") << QString("crash-signed-char.bmp") << false; + QTest::newRow("BMP: test32bfv4") << QString("test32bfv4.bmp") << false;; + QTest::newRow("BMP: test32v5") << QString("test32v5.bmp") << false; QTest::newRow("XPM: marble") << QString("marble.xpm") << false; QTest::newRow("PNG: kollada") << QString("kollada.png") << false; QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false; @@ -1064,6 +1074,8 @@ void tst_QImageReader::readFromDevice_data() QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp"); QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); #ifdef QTEST_HAVE_MNG QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng"); @@ -1155,6 +1167,8 @@ void tst_QImageReader::readFromFileAfterJunk_data() QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp"); QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); // QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng"); // QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng"); @@ -1233,6 +1247,8 @@ void tst_QImageReader::devicePosition_data() QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp"); QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); // QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng"); // QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng"); @@ -1305,6 +1321,12 @@ void tst_QImageReader::readFromResources_data() QTest::newRow("4bpp-rle.bmp") << QString("4bpp-rle.bmp") << QByteArray("bmp") << QSize(640, 480) << QString(""); + QTest::newRow("test32bfv4.bmp") << QString("test32bfv4.bmp") + << QByteArray("bmp") << QSize(373, 156) + << QString(""); + QTest::newRow("test32v5.bmp") << QString("test32v5.bmp") + << QByteArray("bmp") << QSize(373, 156) + << QString(""); #ifdef QTEST_HAVE_GIF QTest::newRow("corrupt.gif") << QString("corrupt.gif") << QByteArray("gif") << QSize(0, 0) |