You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use addFrame or addFrameImageData for more than two image, and 'getBase64GIF' to generate the gif, result get error, the first image does not display when the second image appear.
let gif = new Animated_GIF();
for (let i = 0; i < fileList.length; i++) {
let img = fileList[i];
gif.setSize(img.width, img.height);
gif.addFrame(img);
if (i==fileList.length-1) {
gif.getBase64GIF(b64=>{
let el = document.createElement('a');
el.href = URL.createObjectURL(base64ToBlob(b64));
el.download = 'file.gif';
document.body.appendChild(el);
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
el.dispatchEvent(evt);
document.body.removeChild(el);
})
}
}
The text was updated successfully, but these errors were encountered:
Use addFrame or addFrameImageData for more than two image, and 'getBase64GIF' to generate the gif, result get error, the first image does not display when the second image appear.
let gif = new Animated_GIF();
for (let i = 0; i < fileList.length; i++) {
let img = fileList[i];
gif.setSize(img.width, img.height);
gif.addFrame(img);
if (i==fileList.length-1) {
gif.getBase64GIF(b64=>{
let el = document.createElement('a');
el.href = URL.createObjectURL(base64ToBlob(b64));
el.download = 'file.gif';
document.body.appendChild(el);
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
el.dispatchEvent(evt);
document.body.removeChild(el);
})
}
}
The text was updated successfully, but these errors were encountered: