Browse Source

LibGfx/JPEG: Fix faded 4-channels images

Lucas CHOLLET 2 years ago
parent
commit
844e374de1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp

+ 1 - 1
Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp

@@ -1453,7 +1453,7 @@ static void inverse_dct(JPEGLoadingContext const& context, Vector<Macroblock>& 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);
                         }
                     }
                 }