summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/gif
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-01 13:18:09 (GMT)
commita7178d96d7e9c50a4392ab9ee23b219d26028ed3 (patch)
tree2f3eb0ca36a886e5de276a1d06b85da4b167dfef /src/plugins/imageformats/gif
parente0e0ae322e654b0b152fc54d99201b18b620a0ed (diff)
downloadQt-a7178d96d7e9c50a4392ab9ee23b219d26028ed3.zip
Qt-a7178d96d7e9c50a4392ab9ee23b219d26028ed3.tar.gz
Qt-a7178d96d7e9c50a4392ab9ee23b219d26028ed3.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/imageformats/gif')
-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());