Track non-image Directory sequence in Reader

A bit nasty, since we are storing the current Directory within the Image
instead of a separate attribute so we can not have one without the other
directly. Instead we prioritize with another attribute.
This commit is contained in:
A. Molzer committed 2025-07-25 21:26:57 +02:00
1 parent f993cfb940
commit ab0ce47230
4 files changed
+60 -20

No files matched your search

+1 -4
View File
@@ -123,10 +123,7 @@ fn decode_subifds() {
loop {
len += 1;
let position = decoder.ifd_pointer().unwrap();
let ifd = decoder.read_directory(position).unwrap();
if let Ok(subifd) = decoder.read_directory_tags(&ifd).get_tag(Tag::SubIfd) {
if let Ok(subifd) = decoder.get_tag(Tag::SubIfd) {
let prelen = subifds.len();
subifds.extend(subifd.into_ifd_vec().expect("Failed to decode SubIfd tag"));
eprintln!("New roots: {:?}", &subifds[prelen..]);