From 7d1a19669b8828803d7393396b1f109d86009d3b Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Wed, 22 Jul 2009 12:55:25 +0200 Subject: 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 --- src/plugins/imageformats/gif/qgifhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index de985d8736..0f6a34995a 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()); -- cgit v1.2.3