4 ms·
Gif.js – JavaScript GIF encoding library
- deadfall 12y agoWhat 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.
- skybrian 12y agoI wonder how fast it would be without WebWorkers? Is it worth the complexity?
- RussianCow 12y agoI 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_ 12y agoWebWorkers don't really add a lot of complexity to something like this.
- arcameron 12y agoWhy bother with gif these days, and why in the browser?
- DINKDINK 12y agoTo those downvoting, what use cases make GIFs better than HTML 5
- arcameron 12y agoI don't follow your comment, but I should have been more explicit: gif is a waste of bandwidth compared to a soundless webm
- Wilya 12y agoGifs work everywhere. They're heavy, but support is pretty much guaranteed. That's still not the case for webm.
- arcameron 12y agoIf you're OK with screwing over Safari/IE users, you'll have pretty good support. You could engineer a browser-based fallback to gif, but honestly I wouldn't bother. I'd imagine we can create an impetus to support it if we actually used it more
- userbinator 12y ago...and webm is a waste of CPU and memory compared to gif :-) There are always tradeoffs.
- inspiredjw 12y agoGIFs are better on legacy browers
- ubercow 12y agoLots of social media sites (like Google+) have much better gif support over things like webm. With G+, webms take like 15 seconds to open their fullscreen viewer, click play, wait for buffering, then watching it. Gifs just play right in the stream. I'd personally love to see wider range support for animated webps, but I doubt that's going to happen for a long time, if at all.
- scrollaway 12y agoJust 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/ https://mediacru.sh/ that convert them to videos. Please.
- bhouston 12y agoThere 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 12y agoThis 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 https://imgflip.com/images-to-gif