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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user