summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2016-08-12 16:08:15 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2016-08-15 08:40:36 +0000
commitb674d0d5cc74409d15741a707bd91d2cde8c22bd (patch)
tree608dff6f489b8f8542f5d3303039edfe82407f36 /src
parentd9e66f63a95b24ce3a7d2a30ccaf4dcab85d55a0 (diff)
Fix rendering error in some animated gifs
The code for handling of the rarely used "restore to previous" frame disposal option would mistakenly clear the entire existing frame. It looks like this was a copy/paste mistake in the code; the intention obviously was to clear the newly created backingstore instead. This fixes the rendering of http://media1.giphy.com/media/9Jevgp0CgvAnm/giphy.gif Task-number: QTBUG-55141 Change-Id: I4d344b7733edd62346656154e215c21727f9b6bb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qgifhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
index 9c748c0373..4197d7e959 100644
--- a/src/gui/image/qgifhandler.cpp
+++ b/src/gui/image/qgifhandler.cpp
@@ -409,7 +409,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
backingstore = QImage(qMax(backingstore.width(), w),
qMax(backingstore.height(), h),
QImage::Format_RGB32);
- memset(bits, 0, image->byteCount());
+ memset(backingstore.bits(), 0, backingstore.byteCount());
}
const int dest_bpl = backingstore.bytesPerLine();
unsigned char *dest_data = backingstore.bits();