Expand description
TIFF codec for otf-pixels, implemented from scratch.
Baseline TIFF 6.0: both byte orders, strip and tile layouts, none/LZW/ Deflate/PackBits compression, greyscale/RGB/palette photometrics at 1, 8 and 16 bits. Exotic tags are skipped rather than treated as errors, which SPEC §Formats requires and TIFF’s extensibility makes essential.
§Why TIFF is the streaming showcase
A tiled TIFF stores its pixels as an array of independently compressed rectangles, each with its own offset. That makes it the one v1 format capable of genuine random access: producing an arbitrary region means decompressing the tiles it touches and nothing else.
So TiffDecoder reports DecodeCapability::Regions for a tiled file,
and the scheduler pulls regions rather than rows. Turning a 2 GB tiled
scan into a thumbnail then costs the tiles the thumbnail actually needs —
which is what ADR-0001’s demand-driven design was for, and what the rest of
v1 has been building toward.
Modules§
- tag
- The baseline tags this codec understands (TIFF 6.0 §Section 8).
Structs§
- Directory
- A parsed image file directory.
- Tiff
Codec - The TIFF entry in a sniffing registry.
- Tiff
Decoder - Decodes a TIFF stream.
- Tiff
Encoder - Encodes a baseline TIFF.
- Tiff
Image - Everything about a TIFF image that decoding needs.
Enums§
- Byte
Order - Byte order, from the two-character header.
- Compression
- How pixel data is compressed (TIFF 6.0 §Section 8, plus §Deflate).
- Layout
- Whether the pixels are stored in strips or tiles.
- Photometric
- How samples are interpreted.
- Tiff
Layout - How an encoder arranges pixels in the file.
Functions§
- probe
- Whether
prefixstarts with a TIFF header.