5 ms·
Don't expect too much of QOI. I wanted a simple format that allows you to load/save images quickly, without dealing with the complexity of JPEG or PNG. Even BM
by phoboslab 5y ago
Don't expect too much of QOI.
I wanted a simple format that allows you to load/save images quickly, without dealing with the complexity of JPEG or PNG. Even BMP, TIFF and other "legacy" formats are way more complicated to handle when you start looking into it. So that's what QOI aims to replace.
There's a lot of research for a successor format ongoing. Block based encoding, conversion to YUV, more OP-types etc. have all shown improved numbers. Better support for metadata, different bit-depths and allowing restarts (multithreading) is also high on the list of things to implement.
But QOI will stay as it is. It's the lowest of all hanging fruits that's not rotten on the ground.
- PostThisTooFast 5y agoWhat are we to make of that warning? What shortcomings do you think people will find?
- causality0 5y agoMostly the fact people have found and will find shortcomings that won't be fixed because the project is done, like everything being big-endian.
- flohofwoe 5y ago"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.
- flohofwoe 5y agoIt'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 https://qoiformat.org/qoi-specification.pdf
- riedel 5y agoI 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.
- hulitu 5y ago> I wanted a simple format that allows you to load/save images quickly, without dealing with the complexity of JPEG or PNG. Even BMP, TIFF and other "legacy" formats are way more complicated to handle when you start looking into it. So that's what QOI aims to replace. XPM ? compressed with gzip ?
- abainbridge 5y agoXPM and gzip are still not that simple. QOI is much simpler.