diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index 9c95bc5..4cc1bd7 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -950,9 +950,9 @@ impl Decoder { ))); } if offsets.len() != bytes.len() { - return Err(TiffError::FormatError(TiffFormatError::Format( - String::from("Size mismatch of StripOffsets and StripByteCounts"), - ))); + return Err(TiffError::FormatError( + TiffFormatError::InconsistentSizesEncountered, + )); } let mut res_img = Vec::with_capacity(offsets[0] as usize);