4 ms·
Author here: yes, please use 21st century codecs whenever you can. This is intended only for interoperability. There are sites/apps that take "GIF" too literal
by pornel 9y ago
Author here: yes, please use 21st century codecs whenever you can.
This is intended only for interoperability. There are sites/apps that take "GIF" too literally and don't allow uploads of efficient formats. If you need to share a GIF now you can waste bandwidth at least without ruining the quality.
I wrote this only because most encoders make GIFs look awful, as if nobody upgraded the encoders since '90s. This one uses pngquant, which takes quantization very seriously. Plus it guides pngquant to put more weight on pixels seen longer on screen, avoids creating redundant colors which can be reused from previous frames, and does dithering across frames, which "patches" previous frames as neatly as possible. Overall it gives anims with 1000-3000 colors per frame.
It's written in Rust and does decode/convert/encode in parallel, because it was fun to do.
If you want smaller GIFs, I also wrote another compressor with opposite quality/size trade-off: https://kornel.ski/lossygif https://kornel.ski/lossygif (or use WebM!)
- aw3c2 9y agoVery cool projects indeed!