Adds wraparound specification

This commit is contained in:
Felix "xq" Queißner 2021-11-28 01:17:24 +01:00
parent 7053672d3a
commit ef9ce10bc1

9
qoi.h
View File

@ -148,6 +148,9 @@ The possible chunks are:
g1...g0 forming the green channel difference between -2..1
b1...b0 forming the blue channel difference between -2..1
The difference to the current channel values are using a wraparound operation, so "1 - 2" will result in 255, while
"255 + 1" will result in 0.
| QOI_DIFF_16 |
| Byte + 0 | Byte + 1 |
@ -159,6 +162,9 @@ The possible chunks are:
g3...g0 forming the green channel difference between -8..7
b3...b0 forming the blue channel difference between -8..7
The difference to the current channel values are using a wraparound operation, so "10 - 13" will result in 253, while
"250 + 7" will result in 1.
| QOI_DIFF_24 |
| Byte + 0 | Byte + 1 | Byte + 1 |
@ -171,6 +177,9 @@ The possible chunks are:
b4...b0 forming the blue channel difference between -16..15
a4...a0 forming the alpha channel difference between -16..15
The difference to the current channel values are using a wraparound operation, so "10 - 13" will result in 253, while
"250 + 7" will result in 1.
| QOI_COLOR |
| Byte + 0 |