Added unsupported error for interpretations not supported by JPEG

This commit is contained in:
Alan Race committed 2022-11-22 14:38:27 +01:00
1 parent 7307e96782
commit 4f1c88e35f
2 files changed
+15 -7

No files matched your search

+7 -3
View File
@@ -358,7 +358,6 @@ impl Image {
PhotometricInterpretation::BlackIsZero => {
decoder.set_color_transform(jpeg::ColorTransform::None)
}
PhotometricInterpretation::RGBPalette => todo!(),
PhotometricInterpretation::TransparencyMask => {
decoder.set_color_transform(jpeg::ColorTransform::None)
}
@@ -368,8 +367,13 @@ impl Image {
PhotometricInterpretation::YCbCr => {
decoder.set_color_transform(jpeg::ColorTransform::YCbCr)
}
PhotometricInterpretation::CIELab => todo!(),
_ => todo!(),
photometric_interpretation => {
return Err(TiffError::UnsupportedError(
TiffUnsupportedError::UnsupportedInterpretation(
photometric_interpretation,
),
));
}
}
let data = decoder.decode()?;