diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-24 03:03:02 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-24 03:03:02 +0100 |
commit | 71885caad777b549f86b08c87b072c31a205cf3d (patch) | |
tree | f5536fef7110dd9b672d230a3b03fdb52c6c3660 /tests | |
parent | a2d5e9d3edb869a3ab0d6b52cd9b240d9e5b1be7 (diff) | |
parent | 6124b900d9507687c21e43e68f495bbee9d8d45b (diff) | |
download | qtimageformats-71885caad777b549f86b08c87b072c31a205cf3d.tar.gz |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I6e079d36038a811d3259e2a5a147601fbf5640fc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/tiff/tst_qtiff.cpp | 29 | ||||
-rw-r--r-- | tests/shared/images/tiff.qrc | 4 | ||||
-rw-r--r-- | tests/shared/images/tiff/big_16bpc.tiff | bin | 0 -> 21548 bytes | |||
-rw-r--r-- | tests/shared/images/tiff/big_grayscale.tiff | bin | 0 -> 4581 bytes | |||
-rw-r--r-- | tests/shared/images/tiff/big_rgb.tiff | bin | 0 -> 12748 bytes | |||
-rw-r--r-- | tests/shared/images/tiff/big_rgb_bigendian.tiff | bin | 0 -> 12748 bytes |
6 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/tiff/tst_qtiff.cpp b/tests/auto/tiff/tst_qtiff.cpp index 87fdfa8..267a29c 100644 --- a/tests/auto/tiff/tst_qtiff.cpp +++ b/tests/auto/tiff/tst_qtiff.cpp @@ -90,6 +90,9 @@ private slots: void colorSpace_data(); void colorSpace(); + void bigtiff_data(); + void bigtiff(); + private: QString prefix; }; @@ -173,6 +176,10 @@ void tst_qtiff::readImage_data() QTest::newRow("tiled_oddsize_mono") << QString("tiled_oddsize_mono.tiff") << QSize(59, 71); QTest::newRow("16bpc") << QString("16bpc.tiff") << QSize(64, 46); QTest::newRow("gray16") << QString("gray16.tiff") << QSize(64, 46); + QTest::newRow("big_rgb") << QString("big_rgb.tiff") << QSize(64, 64); + QTest::newRow("big_rgb_bigendian") << QString("big_rgb_bigendian.tiff") << QSize(64, 64); + QTest::newRow("big_grayscale") << QString("big_grayscale.tiff") << QSize(64, 64); + QTest::newRow("big_16bpc") << QString("big_16bpc.tiff") << QSize(64, 46); } void tst_qtiff::readImage() @@ -662,5 +669,27 @@ void tst_qtiff::colorSpace() QCOMPARE(image2, image); } +void tst_qtiff::bigtiff_data() +{ + QTest::addColumn<QString>("expectedFile"); + QTest::addColumn<QString>("bigtiffFile"); + + QTest::newRow("big_rgb") << QString("original_rgb.tiff") << QString("big_rgb.tiff"); + QTest::newRow("big_rgb_bigendian") << QString("original_rgb.tiff") << QString("big_rgb_bigendian.tiff"); + QTest::newRow("big_grayscale") << QString("original_grayscale.tiff") << QString("big_grayscale.tiff"); + QTest::newRow("big_16bpc") << QString("16bpc.tiff") << QString("big_16bpc.tiff"); +} + +void tst_qtiff::bigtiff() +{ + QFETCH(QString, expectedFile); + QFETCH(QString, bigtiffFile); + + QImage expectedImage(prefix + expectedFile); + QImage bigtiffImage(prefix + bigtiffFile); + QVERIFY(!bigtiffImage.isNull()); + QCOMPARE(expectedImage, bigtiffImage); +} + QTEST_MAIN(tst_qtiff) #include "tst_qtiff.moc" diff --git a/tests/shared/images/tiff.qrc b/tests/shared/images/tiff.qrc index e1ce9da..2c876af 100644 --- a/tests/shared/images/tiff.qrc +++ b/tests/shared/images/tiff.qrc @@ -52,5 +52,9 @@ <file>tiff/oddsize_mono.tiff</file> <file>tiff/tiled_rgb.tiff</file> <file>tiff/gray16.tiff</file> + <file>tiff/big_rgb.tiff</file> + <file>tiff/big_16bpc.tiff</file> + <file>tiff/big_grayscale.tiff</file> + <file>tiff/big_rgb_bigendian.tiff</file> </qresource> </RCC> diff --git a/tests/shared/images/tiff/big_16bpc.tiff b/tests/shared/images/tiff/big_16bpc.tiff Binary files differnew file mode 100644 index 0000000..09f949c --- /dev/null +++ b/tests/shared/images/tiff/big_16bpc.tiff diff --git a/tests/shared/images/tiff/big_grayscale.tiff b/tests/shared/images/tiff/big_grayscale.tiff Binary files differnew file mode 100644 index 0000000..244f8fc --- /dev/null +++ b/tests/shared/images/tiff/big_grayscale.tiff diff --git a/tests/shared/images/tiff/big_rgb.tiff b/tests/shared/images/tiff/big_rgb.tiff Binary files differnew file mode 100644 index 0000000..18eecf2 --- /dev/null +++ b/tests/shared/images/tiff/big_rgb.tiff diff --git a/tests/shared/images/tiff/big_rgb_bigendian.tiff b/tests/shared/images/tiff/big_rgb_bigendian.tiff Binary files differnew file mode 100644 index 0000000..0d1a11f --- /dev/null +++ b/tests/shared/images/tiff/big_rgb_bigendian.tiff |