LarpixClient/node_modules/gif.js/site/contents/code.md
olcxja 95aaaa69ea
All checks were successful
Android Build / publish (push) Successful in 57s
Linux Build / publish (push) Successful in 53s
big updat:
- update dependencies
- add webp support and webp conversion for profile images
2026-07-02 22:40:46 +02:00

23 lines
367 B
Markdown

```javascript
var gif = new GIF({
workers: 2,
quality: 10
});
// add a image element
gif.addFrame(imageElement);
// or a canvas element
gif.addFrame(canvasElement, {delay: 200});
// or copy the pixels from a canvas context
gif.addFrame(ctx, {copy: true});
gif.on('finished', function(blob) {
window.open(URL.createObjectURL(blob));
});
gif.render();
```