From 87bd03dbbb55808fe1cadedfe897e0865ebf1f05 Mon Sep 17 00:00:00 2001 From: BobLd <38405645+BobLd@users.noreply.github.com> Date: Sat, 19 Jul 2025 21:01:12 +0100 Subject: [PATCH] Update hack for 1bpc + DeviceGray --- src/UglyToad.PdfPig/Images/ColorSpaceDetailsByteConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig/Images/ColorSpaceDetailsByteConverter.cs b/src/UglyToad.PdfPig/Images/ColorSpaceDetailsByteConverter.cs index 8109b38d0..20b81466a 100644 --- a/src/UglyToad.PdfPig/Images/ColorSpaceDetailsByteConverter.cs +++ b/src/UglyToad.PdfPig/Images/ColorSpaceDetailsByteConverter.cs @@ -79,7 +79,7 @@ private static Span UnpackComponents(Span input, int bitsPerComponen // Enumerate bits in bitsPerComponent-sized chunks from MSB to LSB, masking on the appropriate bits for (int i = end; i >= 0; --i) { - unpacked[u++] = (byte)((b >> i) & right) == 1 ? byte.MinValue : byte.MaxValue; + unpacked[u++] = (byte)((b >> i) & right) == 1 ? byte.MaxValue : byte.MinValue; } }