From 844e374de1a4ce90f97e6f887eb9eb7b2ee004e0 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Mon, 8 May 2023 12:58:14 -0400 Subject: [PATCH] LibGfx/JPEG: Fix faded 4-channels images --- Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp index 34a20d1f8e9..5fac9f47775 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp @@ -1453,7 +1453,7 @@ static void inverse_dct(JPEGLoadingContext const& context, Vector& m macroblocks[mb_index].r[i * 8 + j] = clamp(macroblocks[mb_index].r[i * 8 + j] + 128, 0, 255); macroblocks[mb_index].g[i * 8 + j] = clamp(macroblocks[mb_index].g[i * 8 + j] + 128, 0, 255); macroblocks[mb_index].b[i * 8 + j] = clamp(macroblocks[mb_index].b[i * 8 + j] + 128, 0, 255); - macroblocks[mb_index].k[i * 8 + j] = clamp(macroblocks[mb_index].b[i * 8 + j] + 128, 0, 255); + macroblocks[mb_index].k[i * 8 + j] = clamp(macroblocks[mb_index].k[i * 8 + j] + 128, 0, 255); } } }