Add alpha channel to QOI_HASH
This commit is contained in:
parent
eb29269432
commit
d6b1ec673a
2
qoi.h
2
qoi.h
@ -312,7 +312,7 @@ void *qoi_decode(const void *data, int size, qoi_desc *desc, int channels);
|
|||||||
|
|
||||||
#define QOI_MASK_2 0xc0 // 11000000
|
#define QOI_MASK_2 0xc0 // 11000000
|
||||||
|
|
||||||
#define QOI_COLOR_HASH(C) (C.rgba.r * 3 + C.rgba.g * 5 + C.rgba.b * 7)
|
#define QOI_COLOR_HASH(C) (C.rgba.r * 3 + C.rgba.g * 5 + C.rgba.b * 7 + C.rgba.a * 11)
|
||||||
#define QOI_MAGIC \
|
#define QOI_MAGIC \
|
||||||
(((unsigned int)'q') << 24 | ((unsigned int)'o') << 16 | \
|
(((unsigned int)'q') << 24 | ((unsigned int)'o') << 16 | \
|
||||||
((unsigned int)'i') << 8 | ((unsigned int)'f'))
|
((unsigned int)'i') << 8 | ((unsigned int)'f'))
|
||||||
|
Loading…
Reference in New Issue
Block a user