Verify WhiteIsZero invert, add Gray(1) color type

This was found through the fax4 decoding that is always bilevel.

No longer silently ignore an unknown color type when a photometric
interpretation requires an inversion. DICOM requires that WhiteIsZero
and BlackIsZero are only used for samples-per-pixel=1 but we do not
strictly enforce that early. Previously for the result Multiband color
we just ignored the tag which is also not right.
This commit is contained in:
Aurelia Molzer committed 2025-09-01 00:25:48 +02:00
1 parent 7c6c327817
commit bc71086a96
5 files changed
+33 -8

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ half = { version = "2.4.1" }
quick-error = "2.0.1"
# Rename to avoid confusion with the feature name.
fax34 = { package = "fax", version = "0.2.4", optional = true }
fax34 = { package = "fax", version = "0.2.6", optional = true }
flate2 = { version = "1.0.20", optional = true }
weezl = { version = "0.1.10", optional = true }
zstd = { version = "0.13", optional = true }