diff options
author | Frederico Linhares <fred@linhares.blue> | 2023-07-08 15:11:51 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2023-07-08 15:11:51 -0300 |
commit | 3d2b8451970a36d8942932fc017f5b74ec3f6391 (patch) | |
tree | ab955a9bf779899d3fbf8e1945d10b8dd7a1ad35 | |
parent | 8cb751ff015271e1844feece5db2113eaec64af3 (diff) |
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.
-rw-r--r-- | src/vk/qoi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Pixel, 64> index; - Pixel pixel{}; + Pixel pixel(0, 0, 0, 255); int chunks_len = input.size() - (int)sizeof(PADDING); /* |