From fcca93e5a5a6228d8ec535a15635220176e2eb0a Mon Sep 17 00:00:00 2001 From: Gavin MacGregor Date: Mon, 1 Dec 2025 22:09:49 +0000 Subject: [PATCH] Export animated GIFs with dispose background frames Closes GH-14 where flashing text in Mix mode would not flash to the transparent background. The bundled QtGifImage does not expose a way to change the DisposalMode in giflib and thus it is fixed at 0 or DISPOSAL_UNSPECIFIED. This is a quick and dirty change to fix it to 2 or DISPOSAL_BACKGROUND for our needs. A proper fix would be to fork QtGifImage and add a more accessible API call to choose the DisposalMode value. --- 3rdparty/QtGifImage/include/gifimage/qgifimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/QtGifImage/include/gifimage/qgifimage.cpp b/3rdparty/QtGifImage/include/gifimage/qgifimage.cpp index b4fc36e..c6d4426 100644 --- a/3rdparty/QtGifImage/include/gifimage/qgifimage.cpp +++ b/3rdparty/QtGifImage/include/gifimage/qgifimage.cpp @@ -306,7 +306,7 @@ bool QGifImagePrivate::save(QIODevice *device) const { } GraphicsControlBlock gcbBlock; - gcbBlock.DisposalMode = 0; + gcbBlock.DisposalMode = 2; gcbBlock.UserInputFlag = false; gcbBlock.TransparentColor = getFrameTransparentColorIndex(frameInfo);