Clarify pixel order and image completeness
This commit is contained in:
parent
013cfa1ecd
commit
f752c1a978
7
qoi.h
7
qoi.h
@ -91,8 +91,11 @@ struct qoi_header_t {
|
|||||||
uint8_t colorspace; // 0 = sRGB with linear alpha, 1 = all channels linear
|
uint8_t colorspace; // 0 = sRGB with linear alpha, 1 = all channels linear
|
||||||
};
|
};
|
||||||
|
|
||||||
The decoder and encoder start with {r: 0, g: 0, b: 0, a: 255} as the previous
|
Images are encoded from top to bottom, left to right. The decoder and encoder
|
||||||
pixel value. Pixels are either encoded as
|
start with {r: 0, g: 0, b: 0, a: 255} as the previous pixel value. An image is
|
||||||
|
complete when all pixels specified by width * height have been covered.
|
||||||
|
|
||||||
|
Pixels are encoded as
|
||||||
- a run of the previous pixel
|
- a run of the previous pixel
|
||||||
- an index into an array of previously seen pixels
|
- an index into an array of previously seen pixels
|
||||||
- a difference to the previous pixel value in r,g,b
|
- a difference to the previous pixel value in r,g,b
|
||||||
|
Loading…
Reference in New Issue
Block a user