Add PhotometricInterpretation unknown tag support
Provides a mechanism to support private or extension photometric interpretations (such as CFA)
This commit is contained in:
1 parent
c4285aea4a
commit
f11a1c5393
2 files changed
+12
-7
No files matched your search
@@ -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],
|
||||
),
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user