diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2009-07-22 10:55:25 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2009-09-02 11:51:20 (GMT) |
commit | 7d1a19669b8828803d7393396b1f109d86009d3b (patch) | |
tree | 9634e5cd02df6ce619428607a69ec641913ea05c /tests/auto/qimagereader/tst_qimagereader.cpp | |
parent | 294bcb9ecb43742bdca5a9ffd7d26ce21e971126 (diff) | |
download | Qt-7d1a19669b8828803d7393396b1f109d86009d3b.zip Qt-7d1a19669b8828803d7393396b1f109d86009d3b.tar.gz Qt-7d1a19669b8828803d7393396b1f109d86009d3b.tar.bz2 |
Fixes the gif plugin's rendering for some animated gif files.
In the case of optimized animated gifs, we don't want to discard
the contents of the previous frame, this is handled if needed in the
disposal process.
Task-number: 247365
Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qimagereader/tst_qimagereader.cpp')
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 18900b4..1403280 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -136,6 +136,7 @@ private slots: #if defined QTEST_HAVE_GIF void gifHandlerBugs(); + void animatedGif(); #endif void readCorruptImage_data(); @@ -671,6 +672,18 @@ void tst_QImageReader::gifHandlerBugs() QCOMPARE(im1.convertToFormat(QImage::Format_ARGB32), im2.convertToFormat(QImage::Format_ARGB32)); } } + +void tst_QImageReader::animatedGif() +{ + QImageReader io(prefix + "qt.gif"); + QImage image= io.read(); + int i=0; + while(!image.isNull()){ + QString frameName = QString(prefix + "qt%1.gif").arg(++i); + QCOMPARE(image, QImage(frameName)); + image=io.read(); + } +} #endif class Server : public QObject |