big updat:
- update dependencies - add webp support and webp conversion for profile images
This commit is contained in:
parent
19c3dbb42d
commit
95aaaa69ea
244 changed files with 121382 additions and 86 deletions
23
node_modules/gif.js/site/contents/code.md
generated
vendored
Normal file
23
node_modules/gif.js/site/contents/code.md
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
```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();
|
||||
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue