diff --git a/src/decoder/ifd.rs b/src/decoder/ifd.rs index cbcce61..c033c84 100644 --- a/src/decoder/ifd.rs +++ b/src/decoder/ifd.rs @@ -56,6 +56,7 @@ impl Value { pub fn into_u32(self) -> TiffResult { match self { + Short(val) => Ok(val.into()), Unsigned(val) => Ok(val), UnsignedBig(val) => Ok(u32::try_from(val)?), val => Err(TiffError::FormatError( @@ -76,6 +77,7 @@ impl Value { pub fn into_u64(self) -> TiffResult { match self { + Short(val) => Ok(val.into()), Unsigned(val) => Ok(val.into()), UnsignedBig(val) => Ok(val), val => Err(TiffError::FormatError( diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index 0b65113..af05a78 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -13,7 +13,6 @@ use crate::tags::{ use self::stream::{ ByteOrder, DeflateReader, EndianReader, JpegReader, LZWReader, PackBitsReader, SmartReader, }; -use geo; pub mod ifd; mod stream;