From 934fde185a2ac585ea2c547931ee27737936b69d Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Sat, 3 Oct 2026 14:52:07 +0200 Subject: [PATCH] Default missing PhotometricInterpretation to BlackIsZero --- src/decoder/image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoder/image.rs b/src/decoder/image.rs index 8f1983b..071d28c 100644 --- a/src/decoder/image.rs +++ b/src/decoder/image.rs @@ -176,7 +176,7 @@ impl Image { .map(Value::into_u16) .transpose()? .and_then(PhotometricInterpretation::from_u16) - .ok_or(TiffUnsupportedError::UnknownInterpretation)?; + .unwrap_or(PhotometricInterpretation::BlackIsZero); // Try to parse both the compression method and the number, format, and bits of the included samples. // If they are not explicitly specified, those tags are reset to their default values and not carried from previous images.