image-tiff
image-tiff copied to clipboard
Seek to independent IFD sequence in decoding
This adds two capabilities to the encoder:
next_directoryto decode a directory without already decoding its containedimagetags. 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_imageto 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 withnext_directoryand appropriate tag reads.