Read tag values into byte slice
This commit is contained in:
1 parent
34bd1da99e
commit
24b008a7c3
3 files changed
+84
No files matched your search
@@ -1742,6 +1742,16 @@ impl IfdDecoder<'_> {
|
||||
self.inner.find_tag_buf(tag, buf)
|
||||
}
|
||||
|
||||
/// Read bytes of a tag's value into a byte buffer.
|
||||
pub fn find_tag_bytes(
|
||||
&mut self,
|
||||
tag: Tag,
|
||||
buf: &mut [u8],
|
||||
offset: u64,
|
||||
) -> TiffResult<Option<usize>> {
|
||||
self.inner.find_tag_raw(tag, buf, offset)
|
||||
}
|
||||
|
||||
/// Tries to retrieve a tag and convert it to the desired unsigned type.
|
||||
pub fn find_tag_unsigned<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<Option<T>> {
|
||||
self.find_tag(tag)?
|
||||
|
||||
Reference in new issue
Block a user