gif.js
gif.js copied to clipboard
Stop/Destroy GIF objects while rendering
Is there any way to stop/destroy a GIF while it's rendering? Something like:
gif = new gifjs.GIF({
workers: 8,
quality: options.quality,
repeat: 0,
width: options.width,
height: options.height,
workerScript: chrome.runtime.getURL('scripts/vendor/gif.worker.js')
});
// add frames here
gif.addFrame(...
gif.render();
// oh god this is taking too long please help
gif.stop(); // or gif.destroy();
There's currently no way to abort a frame in progress, it will only stop enqueuing new frames.
gif.abort() isn't mentioned in the documentation
Thanks, @1j01 that's what I was looking for. I'd love to see this documented.