From d6b1ec673ae4df22964646efb7f109ec92c531fc Mon Sep 17 00:00:00 2001 From: Dominic Szablewski Date: Wed, 8 Dec 2021 11:30:58 +0100 Subject: [PATCH] Add alpha channel to QOI_HASH --- qoi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qoi.h b/qoi.h index 2c339f4..d0884c9 100644 --- a/qoi.h +++ b/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_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 \ (((unsigned int)'q') << 24 | ((unsigned int)'o') << 16 | \ ((unsigned int)'i') << 8 | ((unsigned int)'f'))