Documentation: clarify alpha handling for certain chunk types; close #105

This commit is contained in:
Dominic Szablewski 2021-12-21 18:05:30 +01:00
parent 63f43a9fc1
commit 52051a310f
1 changed files with 6 additions and 0 deletions

6
qoi.h
View File

@ -156,6 +156,8 @@ so "1 - 2" will result in 255, while "255 + 1" will result in 0.
Values are stored as unsigned integers with a bias of 2. E.g. -2 is stored as
0 (b00). 1 is stored as 3 (b11).
The alpha value remains unchanged from the previous pixel.
.- QOI_OP_LUMA -------------------------------------.
| Byte[0] | Byte[1] |
@ -180,6 +182,8 @@ so "10 - 13" will result in 253, while "250 + 7" will result in 1.
Values are stored as unsigned integers with a bias of 32 for the green channel
and a bias of 8 for the red and blue channel.
The alpha value remains unchanged from the previous pixel.
.- QOI_OP_RUN ------------.
| Byte[0] |
@ -206,6 +210,8 @@ QOI_OP_RGBA tags.
8-bit green channel value
8-bit blue channel value
The alpha value remains unchanged from the previous pixel.
.- QOI_OP_RGBA ---------------------------------------------------.
| Byte[0] | Byte[1] | Byte[2] | Byte[3] | Byte[4] |