Add SignedByte and SignedShort enum variants (#234)

This commit is contained in:
Wei Ji authored and GitHub committed 2024-07-21 20:37:25 -07:00
1 parent 0c54a18e21
commit 307cd8be97
5 files changed
+47 -1

No files matched your search

+4
View File
@@ -68,6 +68,8 @@ pub enum TiffFormatError {
UnknownPredictor(u16),
UnknownPlanarConfiguration(u16),
ByteExpected(Value),
SignedByteExpected(Value),
SignedShortExpected(Value),
UnsignedIntegerExpected(Value),
SignedIntegerExpected(Value),
Format(String),
@@ -119,6 +121,8 @@ impl fmt::Display for TiffFormatError {
write!(fmt, "Unknown planar configuration “{}” encountered", planar_config)
}
ByteExpected(ref val) => write!(fmt, "Expected byte, {:?} found.", val),
SignedByteExpected(ref val) => write!(fmt, "Expected signed byte, {:?} found.", val),
SignedShortExpected(ref val) => write!(fmt, "Expected signed short, {:?} found.", val),
UnsignedIntegerExpected(ref val) => {
write!(fmt, "Expected unsigned integer, {:?} found.", val)
}