Add support for UNDEFINED type
According to TIFF spec this is an byte-array that may contain arbitrary data.
This commit is contained in:
1 parent
727d78a57c
commit
647de77b70
2 files changed
+5
-1
No files matched your search
+4
-1
@@ -425,7 +425,10 @@ impl Entry {
|
|||||||
let string = decoder.read_string(n)?;
|
let string = decoder.read_string(n)?;
|
||||||
Ok(Ascii(string))
|
Ok(Ascii(string))
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
(Type::UNDEFINED, n) => self.decode_offset(n, bo, limits, decoder, |decoder| {
|
||||||
|
Ok(Unsigned(u32::from(decoder.read_byte()?)))
|
||||||
|
}),
|
||||||
_ => Err(TiffError::UnsupportedError(
|
_ => Err(TiffError::UnsupportedError(
|
||||||
TiffUnsupportedError::UnsupportedDataType,
|
TiffUnsupportedError::UnsupportedDataType,
|
||||||
)),
|
)),
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ pub enum Type(u16) {
|
|||||||
LONG = 4,
|
LONG = 4,
|
||||||
RATIONAL = 5,
|
RATIONAL = 5,
|
||||||
SBYTE = 6,
|
SBYTE = 6,
|
||||||
|
UNDEFINED = 7,
|
||||||
SSHORT = 8,
|
SSHORT = 8,
|
||||||
SLONG = 9,
|
SLONG = 9,
|
||||||
SRATIONAL = 10,
|
SRATIONAL = 10,
|
||||||
|
|||||||
Reference in new issue
Block a user