ezgif-node
v1.0.2
Published
An unofficial api for ezgif.com
Downloads
12
Readme
About The Package
This is an unoffical api for this website. It can make(render), convert file types and edit images(gif,apng,etc) and videos.
If you want to know more about it or need help using it, you can join my discord server here and ask there.
Render
Readering a gif/apng/webp/avif:
const ezgif = require('./index.js')
const fs = require('fs')
let url = await ezgif.render({
type: 'gif',//anyone of the type gif/apng/webp/avif
files: [
{
data: await fs.readFileSync('1.png'), //file buffer
name: '1.png',//file name with extention
delay: 100
},
{
data: await fs.readFileSync('2.png'),
name: '2.png',
},
{
data: await fs.readFileSync('3.png'),
name: '3.png',
}
//you can add more files upto 2000.
],
// delay: 150,//in ms, optional
// nostack: 'on',//optional
// dfrom: 1, //optional
// dto: 5, //optional
// 'fader-delay':6, //optional
// 'fader-frames':10, //optional
// loop: 0, //optional
// fader: 'on', //optional
// 'keep-first': 'on', //optional
// global_colormap: 'on', //optional (gif only)
// percentage: 90, //optional (webp only)
// skipfirst: 'on', //optional (apng only)
})
console.log(url)// returns a url
Convert
Convert the file types.
const ezgif = require('./index.js')
const fs = require('fs')
let url = await ezgif.convert({
type: 'gif-png', // see below for all the types, or run "ezgif.convert('list')"
url: 'https://i.imgur.com/jopn0xJ.gif',
// file: await fs.readFileSync('img.gif'),
// filename: 'upload.gif',
})
console.log(url)// returns a url
Support
Join my discord server if you need anymore help. :)
Conversion Types
1. "video-gif"
2. "gif-mp4"
3. "video-jpg"
4. "video-png"
5. "gif-png"
6. "gif-sprite"
7. "sprite-imgage"
8. "sprite-img"
9. "bmp-jpg"
10. "bmp-png"
11. "bmp-gif"
12. "png-jpg"
13. "png-gif"
14. "png-bmp"
15. "gif-jpg"
16. "svg-png"
17. "svg-jpg"
18. "apng-gif"
19. "apng-webp"
20. "apng-mp4"
21. "mng-apng"
22. "video-apng"
23. "gif-apng"
24. "video-webp"
25. "gif-webp"
26. "jpg-webp"
27. "png-webp"
28. "webp-gif"
29. "webp-jpg"
30. "webp-png"
31. "webp-mp4"
32. "video-avif"
33. "gif-avif"
34. "apng-avif"
35. "webp-avif"
36. "jpg-avif"
37. "avif-gif"
38. "avif-jpg"
39. "avif-png"