diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-12-22 23:16:41 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-12-22 23:16:41 (GMT) |
commit | be2acbcd6cfbaa75b502157061c385129e8f0b35 (patch) | |
tree | 5b6f36690c5cb357e816c51387aa4d795528ec9d /tests/auto | |
parent | 0eabf288f6b05c788f547f761c6e7874856d2703 (diff) | |
download | Qt-be2acbcd6cfbaa75b502157061c385129e8f0b35.zip Qt-be2acbcd6cfbaa75b502157061c385129e8f0b35.tar.gz Qt-be2acbcd6cfbaa75b502157061c385129e8f0b35.tar.bz2 |
Use libjpeg's builtin scaler for implementing setScaledSize()
The libjpeg library has builtin support for scaling to 1/2, 1/4, and 1/8
the original size very quickly. Use this in the implementation of
setScaledSize() to get close to the desired size and then scale
with QImageSmoothScaler the rest of the way.
Task-number: QT-2023
Reviewed-by: Daniel Pope
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 15b1c1c..630cc03 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -322,7 +322,15 @@ void tst_QImageReader::setScaledSize_data() QTest::newRow("PPM: test") << "test.ppm" << QSize(10, 10) << QByteArray("ppm"); QTest::newRow("XBM: gnus") << "gnus" << QSize(200, 200) << QByteArray("xbm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("JPEG: beavis") << "beavis" << QSize(200, 200) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis A") << "beavis" << QSize(200, 200) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis B") << "beavis" << QSize(175, 175) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis C") << "beavis" << QSize(100, 100) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis D") << "beavis" << QSize(100, 200) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis E") << "beavis" << QSize(200, 100) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis F") << "beavis" << QSize(87, 87) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis G") << "beavis" << QSize(50, 45) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis H") << "beavis" << QSize(43, 43) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis I") << "beavis" << QSize(25, 25) << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF QTest::newRow("GIF: earth") << "earth" << QSize(200, 200) << QByteArray("gif"); |