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