Add a dedicated Directory type (#277)

This commit is contained in:
Aurelia Molzer authored and GitHub committed 2025-07-07 19:59:37 -07:00
1 parent 816fb85304
commit df4e42eecc
7 files changed
+239 -43

No files matched your search

+6
View File
@@ -333,6 +333,10 @@ impl Entry {
}
}
pub fn count(&self) -> u64 {
self.count
}
/// Returns a mem_reader for the offset/value field
fn r(&self, byte_order: ByteOrder) -> EndianReader<io::Cursor<Vec<u8>>> {
EndianReader::new(io::Cursor::new(self.offset.to_vec()), byte_order)
@@ -668,4 +672,6 @@ fn offset_to_sbytes(n: usize, entry: &Entry) -> TiffResult<Value> {
}
/// Type representing an Image File Directory
#[doc(hidden)]
#[deprecated = "Use struct `tiff::Directory` instead which contains all fields relevant to an Image File Directory, including the offset to the next directory"]
pub type Directory = HashMap<Tag, Entry>;