Read Short as u16, SignedShort as i16 (#235)

This commit is contained in:
Wei Ji authored and GitHub committed 2025-06-08 18:03:08 -07:00
1 parent 36f7b3b4aa
commit aeab243a96
3 files changed
+27 -27

No files matched your search

+2
View File
@@ -69,6 +69,7 @@ pub enum TiffFormatError {
UnknownPlanarConfiguration(u16),
ByteExpected(Value),
SignedByteExpected(Value),
ShortExpected(Value),
SignedShortExpected(Value),
UnsignedIntegerExpected(Value),
SignedIntegerExpected(Value),
@@ -122,6 +123,7 @@ impl fmt::Display for TiffFormatError {
}
ByteExpected(ref val) => write!(fmt, "Expected byte, {:?} found.", val),
SignedByteExpected(ref val) => write!(fmt, "Expected signed byte, {:?} found.", val),
ShortExpected(ref val) => write!(fmt, "Expected short, {:?} found.", val),
SignedShortExpected(ref val) => write!(fmt, "Expected signed short, {:?} found.", val),
UnsignedIntegerExpected(ref val) => {
write!(fmt, "Expected unsigned integer, {:?} found.", val)