jnordberg / gif.js

JavaScript GIF encoding library
http://jnordberg.github.io/gif.js/
MIT License
4.74k stars 668 forks source link

addFrame makes parts of image flash #145

Closed itsgifnotjiff closed 1 year ago

itsgifnotjiff commented 2 years ago

I am trying to get rid of this flashing of the logo in the bottom left corner of the image (example attached below or can be reproduced at this link. I have confirmed that each frame passed to the gif object is indeed the right color. I am using the following constructor :

var tempGIF = new GIF({
                workers: 4,
                quality: quality,
                height: this.mapHeight + this.infoCanvas.height,
                width: this.mapWidth,
                workerScript: 'gif.worker.js'
            });

and adding frames using gif.addFrame(composedCnv, { delay: delayInput }); and although I experimented with background and transparent I am unable to get rid of the flashing behaviour. Can anyone help me please? I have mostly figured out the issue with my StackOverflow question, but as stated there I am looking for an explanation so I understand why this quality issue only affects the logo.

GeoGIF-RADAR_1KM_RRAI-10-03-2022