IMAGE ENCODER QOI
Version: GIT Web: https://github.com/ phoboslab/qoi
Our commitment for efficient data compression know no limits. That’s why we’re so passionate about image encoders such as Lepton (LXF215) and JpegXL (LXF283). Here’s another one called QOI – Quite Okay Image, which has been developed by Dominic Szablewski.
QOI is a blazingly fast image encoder that claims to be up to 50 times faster in compression and up to four times faster in decompression compared to the standard Libpng library. The project is in the very early stage of its lifecycle – it’s a proof of concept than a final product – but we can already use it. It all starts with compiling the main executable from the source code:
$ gcc -o qoiconv qoiconv.c
The resulting file will be able to convert existing PNG files to the QOI format, and decode them back. QOI is a lossless format, so it only works with PNG and not with JPEG. It’s also uncomplicated in that it passes each pixel only once and has just four ways of compressing colour data (choosing the one based on the previous pixel’s data). The aspiration towards simplicity, as opposed to the over-design of industry-standard image encoders, delivers decent performance figures. Compression ratio is only 10-15 per cent smaller than the one of Libpng, whereas the speed is far better, and consequently the CPU overhead is just negligible.
Moreover, the QOI performance doesn’t depend on the type of image. QOI runs equally quickly when encoding screenshots, photos and drawn artwork. Even though we don’t have the appropriate image plug-ins to view images encoded with QOI, you can use it for compressing and archiving purposes.
Note that there are several other compatible implementations in other languages. The Go version is at bit.ly/3xxHhB7, and the Rust version can be found at bit.ly/3xvu63H.