image-tiff
image-tiff copied to clipboard
Read Short as u16, SignedShort as i16
Previously, Short values were read incorrectly as u32
instead of u16
, and SignedShort values were read incorrectly as i32
instead of i16
.
This PR does the following:
- Add
TiffFormatError::ShortExpected
enum variant - Correctly cast
Type::SHORT
as u16 values, and support casting Short to other unsigned types via theinto_u32_vec
andinto_u64_vec
methods. - Correctly cast
Type::SSHORT
as i16 values
Fixes #204