Read out short vecs and ascii from ifds

This commit is contained in:
ruffson committed 2020-11-16 18:52:04 +01:00
1 parent 83004c8344
commit 3953bd31e1
2 files changed
+49 -2

No files matched your search

+9
View File
@@ -728,6 +728,10 @@ impl<R: Read + Seek> Decoder<R> {
pub fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Vec<u32>> {
self.get_tag(tag)?.into_u32_vec()
}
pub fn get_tag_u16_vec(&mut self, tag: Tag) -> TiffResult<Vec<u16>> {
self.get_tag(tag)?.into_u16_vec()
}
pub fn get_tag_u64_vec(&mut self, tag: Tag) -> TiffResult<Vec<u64>> {
self.get_tag(tag)?.into_u64_vec()
}
@@ -747,6 +751,11 @@ impl<R: Read + Seek> Decoder<R> {
self.get_tag(tag)?.into_u8_vec()
}
/// Tries to retrieve a tag and convert it to a ascii vector.
pub fn get_tag_ascii_string(&mut self, tag: Tag) -> TiffResult<String> {
self.get_tag(tag)?.into_string()
}
/// Decompresses the strip into the supplied buffer.
/// Returns the number of bytes read.
fn expand_strip<'a>(