3 ms·
This is impressive, I was curious if it was just better on simpler images with many duplicate pixels but it's nice to see it working well with photography too
by haxiomic 5y ago
This is impressive, I was curious if it was just better on simpler images with many duplicate pixels but it's nice to see it working well with photography too
e.g.
https://phoboslab.org/files/qoibench/images/wallpaper/EwZDbLoWQAEskRq.png https://phoboslab.org/files/qoibench/images/wallpaper/EwZDbL...
decode ms encode ms decode mpps encode mpps size kb
libpng: 148.4 3995.5 55.88 2.08 12223
stbi: 161.0 1858.3 51.50 4.46 19199
qoi: 60.8 95.6 136.49 86.78 12868
I'm interested if there's a standardized benchmark used in the academic literature this could be tested against
In any case the results are impressive enough that this will 100% be used in projects I work on!
Many thanks to the author for their work <3
- orlp 5y agoWhen I download that PNG file it is 10785 KB. If I re-encode it using FLIF 0.4 (to my knowledge still the best off-the-shelf lossless image compression) it is 7368 KB. That's 57% of the size of qoi, quite a lot smaller. You pay for it in encode/decode time though.
- fastball 5y agoInterestingly I actually managed to shave 400kb off of that PNG by just running it through some PNG optimizers. Not great savings but were still some to be had!
- minus7 5y agoFLIF has been superseded[1] by JPEG XL, which, in my very limited testing, performed better (speed and compression-wise; libjxl) than FLIF. Interesting though that FLIF 0.4 was released 3 days ago. I haven't checked out that new release (and won't), but the previous one wasn't great code and was a pain to use (ended up using its CLI instead of the lib). We ended up going back to PNG because of interoperability and speed. I haven't looked at libjxl's API yet. Edit: 8605KB in 11.5s with libjxl, so it's not actually better than FLIF 0.4 (7368KB in 23.9s) [1]: https://flif.info/#update https://flif.info/#update
- nightcracker 5y agoYes, I am aware it has been 'superseded' but in my experience for lossless compression it's still usually better.
- gfody 5y agopngcrush -brute 10355kb cjxl -q 100 -e 9 8413kb
- haxiomic 5y agoCan be made smaller for sure, but if I'm say working with 10,000 images in my app and decoding all the time, a 3-4x speedup in the decode time can be a major saving for ~ 10-40% increase in file size with a lib I can just drop in my project without effort