From 4011837c4f67c3072b285565d5f7936d2768bf34 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 28 Aug 2026 16:48:56 +0200 Subject: [PATCH] nihav_codec_support/msstructs: do not error out on greyscale format --- nihav-codec-support/src/codecs/msstructs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-codec-support/src/codecs/msstructs.rs b/nihav-codec-support/src/codecs/msstructs.rs index d5bec5a..e714083 100644 --- a/nihav-codec-support/src/codecs/msstructs.rs +++ b/nihav-codec-support/src/codecs/msstructs.rs @@ -56,7 +56,7 @@ impl MSBitmapInfo { if !(1..=32).contains(&self.bitcount) { return Err("bitcount"); } - if (self.bitcount <= 8 && (self.colors == 0 || self.colors > (1 << self.bitcount))) || (self.bitcount > 8 && self.colors != 0) { + if (self.bitcount <= 8 && !(&self.compression[..2] == b"Y8") && (self.colors == 0 || self.colors > (1 << self.bitcount))) || (self.bitcount > 8 && self.colors != 0) { return Err("clr_used"); } if self.clr_important as usize > self.colors { -- 2.39.5