Skip to content

Conversation

197g
Copy link
Member

@197g 197g commented Jul 14, 2025

This adds two capabilities to the encoder:

  • next_directory to decode a directory without already decoding its contained image tags. It only reads a single contiguous range of file data and is thus quite a lot cheaper if only very specific tag values are of interest (or the image is to be skipped).
  • current_directory_as_image to manually augment the IFD with its contained image.
  • restart_at_{directory,image} to setup a new root directory. This can also be used to iterate SubIFDs in arbitrary depth by combining it with next_directory and appropriate tag reads.

@197g 197g mentioned this pull request Jul 19, 2025
197g added 3 commits July 25, 2025 21:21
This serves two purposes: reliably resetting the state of the decoder
after kinds of failure; and moving the decoder to a SubIFD chain.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant