Merge pull request #394 from powturns/main
Add PhotometricInterpretation unknown tag support
This commit is contained in:
2 files changed
+8
-3
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(
|
||||
PhotometricInterpretation::TransparencyMask | PhotometricInterpretation::Unknown(_) => {
|
||||
Err(TiffError::UnsupportedError(
|
||||
TiffUnsupportedError::InterpretationWithBits(
|
||||
self.photometric_interpretation,
|
||||
vec![self.bits_per_sample; self.samples as usize],
|
||||
),
|
||||
)),
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -295,7 +295,10 @@ pub enum CompressionMethod(u16) unknown(
|
||||
}
|
||||
|
||||
tags! {
|
||||
pub enum PhotometricInterpretation(u16) {
|
||||
pub enum PhotometricInterpretation(u16) unknown(
|
||||
/// A private or extension tag
|
||||
unknown
|
||||
) {
|
||||
WhiteIsZero = 0,
|
||||
BlackIsZero = 1,
|
||||
RGB = 2,
|
||||
|
||||
Reference in new issue
Block a user