summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2009-07-22 10:55:25 (GMT)
committerPierre Rossi <pierre.rossi@nokia.com>2009-09-02 11:51:20 (GMT)
commit7d1a19669b8828803d7393396b1f109d86009d3b (patch)
tree9634e5cd02df6ce619428607a69ec641913ea05c /src/plugins
parent294bcb9ecb43742bdca5a9ffd7d26ce21e971126 (diff)
downloadQt-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 'src/plugins')
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index de985d8..0f6a349 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -234,7 +234,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
#define LM(l, m) (((m)<<8)|l)
digress = false;
- int initial = length;
+ const int initial = length;
while (!digress && length) {
length--;
unsigned char ch=*buffer++;
@@ -333,7 +333,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
sheight = newtop + newheight;
QImage::Format format = trans_index >= 0 ? QImage::Format_ARGB32 : QImage::Format_RGB32;
- if (image->isNull() || (image->size() != QSize(swidth, sheight)) || image->format() != format) {
+ if (image->isNull()) {
(*image) = QImage(swidth, sheight, format);
memset(image->bits(), 0, image->numBytes());