Read tag values into byte slice

This commit is contained in:
A. Molzer committed 2026-01-11 17:20:04 +01:00
1 parent 34bd1da99e
commit 24b008a7c3
3 files changed
+84

No files matched your search

+10
View File
@@ -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)?