]> git.nihav.org Git - nihav.git/commitdiff
nihav_codec_support/msstructs: ignore bitplanes for large enough bitdepth during...
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 7 Oct 2026 10:17:50 +0000 (12:17 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 7 Oct 2026 10:17:50 +0000 (12:17 +0200)
nihav-codec-support/src/codecs/msstructs.rs

index e71408368d5fc06e7e690aeff6474536a04f45da..a3f4db3778a0d87610bf3662b1978525a0ccb9dd 100644 (file)
@@ -50,7 +50,7 @@ impl MSBitmapInfo {
             return Err("height");
         }
         if !KNOWN_BAD_FORMATS.contains(&&self.compression) {
-            if self.planes == 0 || self.planes > self.bitcount {
+            if (self.planes == 0 && self.bitcount <= 8) || self.planes > self.bitcount {
                 return Err("planes");
             }
             if !(1..=32).contains(&self.bitcount) {