top | item 8155381

Gif.js – JavaScript GIF encoding library

60 points| electic | 11 years ago |github.com | reply

15 comments

order
[+] bhouston|11 years ago|reply
There seems to be a lack of dithering in the resulting images on the test page that makes the banding in smooth gradient regions very noticeable. But other than that, amazing job! Maybe it is just a settings issue.
[+] dylanwenzlau|11 years ago|reply
This is a killer library, it worked much better than our previous solution to gif-encoding on the frontend.

shameless plug: If you want to see a fun production use case of the gif.js library, check out https://imgflip.com/images-to-gif

[+] skybrian|11 years ago|reply
I wonder how fast it would be without WebWorkers? Is it worth the complexity?
[+] RussianCow|11 years ago|reply
I haven't tried the library, so I can't attest to how fast/slow it is, but I think the point of using web workers is so that the gif can be produced asynchronously, without hanging the whole tab. So if you're producing a really giant image, yes, it would be worth it.
[+] m1sta_|11 years ago|reply
WebWorkers don't really add a lot of complexity to something like this.
[+] arcameron|11 years ago|reply
Why bother with gif these days, and why in the browser?
[+] scrollaway|11 years ago|reply
Just because it's a crappy, outdated format doesn't mean a gif.js isn't useful.

That said, please don't use gifs. Use hosts like https://mediacru.sh/ that convert them to videos.

Please.

[+] DINKDINK|11 years ago|reply
To those downvoting, what use cases make GIFs better than HTML 5
[+] deadfall|11 years ago|reply
What is the rules for resubmitting old stuff? I remember this Git repo was posted 8 months back and double checked with the search at the bottom.