News for hackers. Stuff that matters.
Re:QOI – The “Quite OK Image Format” for fast, lossless imag... by PostThisTooFast on Thursday December 23, 2021 @06:56PM (#29668071)
What are we to make of that warning? What shortcomings do you think people will find?
Re:QOI – The “Quite OK Image Format” for fast, lossless imag... by flohofwoe on Friday December 24, 2021 @05:07AM (#29672256)
It's simply better suited for some types of images than others (e.g. the resulting size is sometimes bigger than expected). The main advantage is the very simple encoder and decoder with a specification that fits on a single page (and which still yields surprisingly good results for many image types):

https://qoiformat.org/qoi-specification.pdf

Re:QOI – The “Quite OK Image Format” for fast, lossless imag... by riedel on Friday December 24, 2021 @05:32AM (#29672406)
I agree that it is quite easy to grasp the format in terms of implementation. It seems basically like writing a image VM that accepts byte code. I think that could really be a way to specify many file formats more concicesly. If e.g. you chose the correct automata/transducer class one can easily e.g. specify some hedge grammar based XML file format and get a binary representation. Starting from grammars as a spec it is typically more difficult if you want to derive an implementation.

However I e.g. wonder from reading the concrete spec why you e.g. cannot differentially change the alpha channel leading me to the question what happens if images have different alpha levels.

Re:QOI – The “Quite OK Image Format” for fast, lossless imag... by causality0 on Friday December 24, 2021 @04:57AM (#29672174)
Mostly the fact people have found and will find shortcomings that won't be fixed because the project is done, like everything being big-endian.
Re:QOI – The “Quite OK Image Format” for fast, lossless imag... by flohofwoe on Friday December 24, 2021 @05:10AM (#29672270)
"Everything" means two 32-bit integer values (width and height) in the header, that's hardly much of a downside ;)

Usually it's a good idea anyway to read file headers byte by byte instead of mapping a struct over it to avoid alignment, padding and endianness issues.