Re:QOI – The “Quite OK Image Format” for fast, lossless imag...
by adgjlsfhk1 on Thursday December 23, 2021 @06:49PM
(#29668020)
Writing an encoder for that sounds like a nightmare though. Also the speed would suck since you would have unpredictable memory accesses.
Re:QOI – The “Quite OK Image Format” for fast, lossless imag...
by meltedcapacitor on Friday December 24, 2021 @04:37AM
(#29672061)
An encoder just walking a regular spiral (no uniform bands detection) is not hard. The band thing is an accidental artefact of the idea but plain run length encoding probably already captures most of the effect so no imperative to actually implement it.
Speed, yes, it is a fair objection, until hardware adopts spiral encoding :-)
This would eliminate the need for a header (bloat!) as the end of file is clearly defined, the size is defined after decoding the top and right line (second turn), and it's not so sensitive to orientation (a pathological image can compress very differently in portrait vs landscape in line oriented formats). Color profile can be specified in the spec.
Also allows skipping altogether some image-wide bands or columns that are of the background color (defined by the first pixel) as you do not need to walk over all the pixels.