Add PhotometricInterpretation unknown tag support

Provides a mechanism to support private or extension
photometric interpretations (such as CFA)
This commit is contained in:
Dustin Thomson committed 2026-05-28 08:48:12 -06:00
1 parent c4285aea4a
commit f11a1c5393
2 files changed
+12 -7

No files matched your search

+8 -6
View File
@@ -660,12 +660,14 @@ impl Image {
),
)),
PhotometricInterpretation::RGBPalette => Ok(ColorType::Palette(self.bits_per_sample)),
PhotometricInterpretation::TransparencyMask => Err(TiffError::UnsupportedError(
TiffUnsupportedError::InterpretationWithBits(
self.photometric_interpretation,
vec![self.bits_per_sample; self.samples as usize],
),
)),
PhotometricInterpretation::TransparencyMask | PhotometricInterpretation::Unknown(_) => {
Err(TiffError::UnsupportedError(
TiffUnsupportedError::InterpretationWithBits(
self.photometric_interpretation,
vec![self.bits_per_sample; self.samples as usize],
),
))
}
}
}