Conversion tool used in Sumopaint. It's fast and gives good compression results.
We are using stb_image and stb_image_write for PNG encoding/decoding. We were frustrated the performance of the encoding and the size of the produced pngs. It was far from good. We decided to try something else We found Qoi, very simple and nice image encoding algorithm with no additional hacks/libraries. Qoi alone is better than (stb_image) pngs so we decided to use it. Our base engine already had Igor Pavlov's LZMA encoding support and we decided to try how it works with qois. The result were surprisingly good. The idea is to first encode the image with qoi and then pack it with LZMA. In this process, the very fast qoi compression decreases the size of the data going to slower LZMA (from 30-60% approximately) which helps the performance compared to directly compressing the image with LZMA. Resulted image's are most of the time much smaller than png's at least when using some simple png encoders. Even professional software and with very good compression settings, the results are comparable.
Credits to original qoi repository: phoboslab/qoi and to Igor Pavlov's LZMA: 7ZIP SDK
Compile (requires Make)
makeExample: Convert png to qoi
./voiconv foobar.png foobar.qoiExample: Convert png to voi
./voiconv foobar.png foobar.voiExample: Convert voi to png
./voiconv foobar.voi foobar.pngSome test results:
| File | File name | Orignal (png) | QOI | VOI | stb_image_png |
|---|---|---|---|---|---|
![]() |
png-clipart-minecraft-minecraft.png | 22.1kB | 97.7kB | 20.0kB | 70.5kB |
![]() |
bellard2.png | 41.4kB | 68.3kB | 36.6kB | 63.2kB |
![]() |
Beer-PNG-10.png | 285.8kB | 370.3kB | 131.1kB | 339.4kB |


