From 72cee824a0b3a140944a97048b76c298572896e0 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Sun, 5 Feb 2023 22:41:16 +0100 Subject: [PATCH] Readd deleted code... --- src/ImageSharp/Formats/Tga/TgaDecoderCore.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ImageSharp/Formats/Tga/TgaDecoderCore.cs b/src/ImageSharp/Formats/Tga/TgaDecoderCore.cs index 7ca5fa9e66..65ab8dfc15 100644 --- a/src/ImageSharp/Formats/Tga/TgaDecoderCore.cs +++ b/src/ImageSharp/Formats/Tga/TgaDecoderCore.cs @@ -262,6 +262,13 @@ internal sealed class TgaDecoderCore : IImageDecoderInternals ReadPalettedBgr24Pixel(stream, palette, colorMapPixelSizeInBytes, x, color, pixelRow); } } + else + { + for (int x = 0; x < width; x++) + { + ReadPalettedBgr24Pixel(stream, palette, colorMapPixelSizeInBytes, x, color, pixelRow); + } + } break; @@ -273,6 +280,13 @@ internal sealed class TgaDecoderCore : IImageDecoderInternals ReadPalettedBgra32Pixel(stream, palette, colorMapPixelSizeInBytes, x, color, pixelRow); } } + else + { + for (int x = 0; x < width; x++) + { + ReadPalettedBgra32Pixel(stream, palette, colorMapPixelSizeInBytes, x, color, pixelRow); + } + } break; }