summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/image/qimagereader/tst_qimagereader.cpp')
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp160
1 files changed, 0 insertions, 160 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index d2bf7ee562..8a18bee83f 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -121,12 +121,6 @@ private slots:
void readFromResources_data();
void readFromResources();
- void dotsPerMeter_data();
- void dotsPerMeter();
-
- void physicalDpi_data();
- void physicalDpi();
-
void sizeBeforeRead_data();
void sizeBeforeRead();
@@ -148,15 +142,6 @@ private slots:
void supportsOption_data();
void supportsOption();
- void tiffCompression_data();
- void tiffCompression();
- void tiffEndianness();
-
- void tiffOrientation_data();
- void tiffOrientation();
-
- void tiffGrayscale();
-
void autoDetectImageFormat();
void fileNameProbing();
@@ -1470,7 +1455,6 @@ void tst_QImageReader::readCorruptImage_data()
<< QString("QImage: XPM pixels missing on image line 3")
<< QByteArray("xpm");
QTest::newRow("corrupt xbm") << QString("corrupt.xbm") << false << QString("") << QByteArray("xbm");
- QTest::newRow("corrupt tiff") << QString("corrupt-data.tif") << true << QString("") << QByteArray("tiff");
QTest::newRow("corrupt svg") << QString("corrupt.svg") << true << QString("") << QByteArray("svg");
QTest::newRow("corrupt svgz") << QString("corrupt.svgz") << true << QString("") << QByteArray("svgz");
}
@@ -1539,148 +1523,6 @@ void tst_QImageReader::supportsOption()
QVERIFY(!reader.supportsOption(option));
}
-void tst_QImageReader::tiffCompression_data()
-{
- QTest::addColumn<QString>("uncompressedFile");
- QTest::addColumn<QString>("compressedFile");
-
- QTest::newRow("TIFF: adobedeflate") << "rgba_nocompression_littleendian.tif"
- << "rgba_adobedeflate_littleendian.tif";
- QTest::newRow("TIFF: lzw") << "rgba_nocompression_littleendian.tif"
- << "rgba_lzw_littleendian.tif";
- QTest::newRow("TIFF: packbits") << "rgba_nocompression_littleendian.tif"
- << "rgba_packbits_littleendian.tif";
- QTest::newRow("TIFF: zipdeflate") << "rgba_nocompression_littleendian.tif"
- << "rgba_zipdeflate_littleendian.tif";
-}
-
-void tst_QImageReader::tiffCompression()
-{
- QFETCH(QString, uncompressedFile);
- QFETCH(QString, compressedFile);
-
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage uncompressedImage(prefix + uncompressedFile);
- QImage compressedImage(prefix + compressedFile);
-
- QCOMPARE(uncompressedImage, compressedImage);
-}
-
-void tst_QImageReader::tiffEndianness()
-{
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage littleEndian(prefix + "rgba_nocompression_littleendian.tif");
- QImage bigEndian(prefix + "rgba_nocompression_bigendian.tif");
-
- QCOMPARE(littleEndian, bigEndian);
-}
-
-void tst_QImageReader::tiffOrientation_data()
-{
- QTest::addColumn<QString>("expected");
- QTest::addColumn<QString>("oriented");
- QTest::newRow("Indexed TIFF, orientation1") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_1.tiff";
- QTest::newRow("Indexed TIFF, orientation2") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_2.tiff";
- QTest::newRow("Indexed TIFF, orientation3") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_3.tiff";
- QTest::newRow("Indexed TIFF, orientation4") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_4.tiff";
- QTest::newRow("Indexed TIFF, orientation5") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_5.tiff";
- QTest::newRow("Indexed TIFF, orientation6") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_6.tiff";
- QTest::newRow("Indexed TIFF, orientation7") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_7.tiff";
- QTest::newRow("Indexed TIFF, orientation8") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_8.tiff";
-
- QTest::newRow("Mono TIFF, orientation1") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_1.tiff";
- QTest::newRow("Mono TIFF, orientation2") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_2.tiff";
- QTest::newRow("Mono TIFF, orientation3") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_3.tiff";
- QTest::newRow("Mono TIFF, orientation4") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_4.tiff";
- QTest::newRow("Mono TIFF, orientation5") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_5.tiff";
- QTest::newRow("Mono TIFF, orientation6") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_6.tiff";
- QTest::newRow("Mono TIFF, orientation7") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_7.tiff";
- QTest::newRow("Mono TIFF, orientation8") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_8.tiff";
-
- QTest::newRow("RGB TIFF, orientation1") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_1.tiff";
- QTest::newRow("RGB TIFF, orientation2") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_2.tiff";
- QTest::newRow("RGB TIFF, orientation3") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_3.tiff";
- QTest::newRow("RGB TIFF, orientation4") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_4.tiff";
- QTest::newRow("RGB TIFF, orientation5") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_5.tiff";
- QTest::newRow("RGB TIFF, orientation6") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_6.tiff";
- QTest::newRow("RGB TIFF, orientation7") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_7.tiff";
- QTest::newRow("RGB TIFF, orientation8") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_8.tiff";
-}
-
-void tst_QImageReader::tiffOrientation()
-{
- QFETCH(QString, expected);
- QFETCH(QString, oriented);
-
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage expectedImage(prefix + expected);
- QImage orientedImage(prefix + oriented);
- QCOMPARE(expectedImage, orientedImage);
-}
-
-void tst_QImageReader::tiffGrayscale()
-{
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage actualImage(prefix + "grayscale.tif");
- QImage expectedImage(prefix + "grayscale-ref.tif");
-
- QCOMPARE(expectedImage, actualImage.convertToFormat(expectedImage.format()));
-}
-
-void tst_QImageReader::dotsPerMeter_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<int>("expectedDotsPerMeterX");
- QTest::addColumn<int>("expectedDotsPerMeterY");
- QTest::addColumn<QByteArray>("format");
- QTest::newRow("TIFF: 72 dpi") << ("rgba_nocompression_littleendian.tif") << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54)) << QByteArray("tiff");
- QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54)) << QByteArray("tiff");
-}
-
-void tst_QImageReader::dotsPerMeter()
-{
- QFETCH(QString, fileName);
- QFETCH(int, expectedDotsPerMeterX);
- QFETCH(int, expectedDotsPerMeterY);
- QFETCH(QByteArray, format);
-
- SKIP_IF_UNSUPPORTED(format);
-
- QImage image(prefix + fileName);
-
- QCOMPARE(image.dotsPerMeterX(), expectedDotsPerMeterX);
- QCOMPARE(image.dotsPerMeterY(), expectedDotsPerMeterY);
-}
-
-void tst_QImageReader::physicalDpi_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<int>("expectedPhysicalDpiX");
- QTest::addColumn<int>("expectedPhysicalDpiY");
- QTest::addColumn<QByteArray>("format");
- QTest::newRow("TIFF: 72 dpi") << "rgba_nocompression_littleendian.tif" << 72 << 72 << QByteArray("tiff");
- QTest::newRow("TIFF: 100 dpi") << "image_100dpi.tif" << 100 << 100 << QByteArray("tiff");
-}
-
-void tst_QImageReader::physicalDpi()
-{
- QFETCH(QString, fileName);
- QFETCH(int, expectedPhysicalDpiX);
- QFETCH(int, expectedPhysicalDpiY);
- QFETCH(QByteArray, format);
-
- SKIP_IF_UNSUPPORTED(format);
-
- QImage image(prefix + fileName);
-
- QCOMPARE(image.physicalDpiX(), expectedPhysicalDpiX);
- QCOMPARE(image.physicalDpiY(), expectedPhysicalDpiY);
-}
-
void tst_QImageReader::autoDetectImageFormat()
{
// Assume PNG is supported :-)
@@ -1821,8 +1663,6 @@ void tst_QImageReader::testIgnoresFormatAndExtension_data()
QTest::newRow("beavis.jpg") << "beavis" << "jpg" << "jpeg";
- QTest::newRow("image_100dpi.tif") << "image_100dpi" << "tif" << "tiff";
-
QTest::newRow("rect.svg") << "rect" << "svg" << "svg";
QTest::newRow("rect.svgz") << "rect" << "svgz" << "svgz";
}