From 3d2b8451970a36d8942932fc017f5b74ec3f6391 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Sat, 8 Jul 2023 15:11:51 -0300 Subject: fixt Use correct value for alpha when decoding QOI * src/vk/qoi.cpp: Only the initial pixel must use 255 for alpha. The index array must use 0 for alpha. --- src/vk/qoi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vk') diff --git a/src/vk/qoi.cpp b/src/vk/qoi.cpp index 4e2b2a4..bc0caab 100644 --- a/src/vk/qoi.cpp +++ b/src/vk/qoi.cpp @@ -50,7 +50,7 @@ RGBA::RGBA(): red{0}, green{0}, blue{0}, - alpha{255} + alpha{0} { } @@ -130,7 +130,7 @@ Image::Image(const char *file_path, uint8_t channels): this->pixels = new uint8_t[this->pixels_len]; std::array index; - Pixel pixel{}; + Pixel pixel(0, 0, 0, 255); int chunks_len = input.size() - (int)sizeof(PADDING); /* -- cgit v1.2.3