This commit is contained in:
ZettaScript 2022-12-16 22:12:43 +01:00
commit 8099e065f3
4 changed files with 49 additions and 11 deletions

View file

@ -16,6 +16,16 @@ Fast encoder/decoder for [QOI image format](https://qoiformat.org/), implemented
- `no_std` support.
- Roundtrip-tested vs the reference C implementation; fuzz-tested.
### Note about this fork
This fork implements a slight improvement to the original specs, which leaves unused the `QOI_OP_RGBA` chunk flag with RGB.
Here, we use this flag for the new `QOI_OP_RUN2` chunk. It's like the `QOI_OP_RUN` chunk, but followed by two bytes representing `run` (BE). (only for RGB, as the flag is already used for RGBA)
The decoder remains fully compatible with the original one (except when using `QOI_OP_RGBA` in a RGB image). The encoder is fully compatible for RGBA, not for RGB (except using the `reference` feature).
Why this? Because it enables significant improvements for compressing images with large uniform areas (such as screen captures), or for encoding a diff-filtered video stream where successive frames often have identical regions. (see [syeve](https://framagit.org/ZettaScript/syeve) for the video encoding)
### Examples
```rust