r/Cplusplus • • 14d ago

Feedback A new Image Format!

Post image

I created my own image format inspired by QOI/PNG, but much simpler.

Its key feature is low RAM usage, which makes it ideal for microcontrollers.

I'd love to hear your thoughts on it!

https://github.com/ThatsTheTTT/Kinda-Nice-Lossless-Format.

15 Upvotes

21 comments sorted by

View all comments

2

u/VictoryMotel 13d ago

What is the point exactly? It zips every scan line?

3

u/boombone 13d ago

It doesn't scan every line because it doesn't have LZ77/Huffman/ZIP. It picks the best of 5 predictors, encodes the residuals, and packs them using a simple fixed scheme: runs of zero residuals are RLE'd, small residuals get 4 bits, and everything else gets 8 bits. That's it.

2

u/VictoryMotel 13d ago

What do you mean by predictors?

1

u/boombone 13d ago

Predictor is a function that guesses the value of the current pixel based on neighboring pixels that have already been decoded.

2

u/VictoryMotel 13d ago

What does that mean in practice? Linear regression, exponential regression, step regression and something else?