#[non_exhaustive]pub enum DecodeCapability {
Sequential,
Regions,
}Expand description
What a decoder can produce without a full decode.
The scheduler uses this to decide whether it may request arbitrary regions from a source or must pull rows in order (ARCHITECTURE §Layer 2).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sequential
Emits rows in top-to-bottom order as bytes arrive.
Out-of-order region requests are not supported; the engine reads forward. This covers non-interlaced PNG, baseline JPEG, GIF frames, strip TIFF and raw.
Regions
Can produce an arbitrary region without decoding the whole image.
This covers tiled TIFF, and is what makes the giant-image thumbnail path constant-memory.
A JPEG decoding at a reduced M/8 scale is not this, though an
earlier version of this comment said it was: scaled decode lowers the
resolution but still emits rows in order, and every coefficient is
still entropy-decoded. It is a decoder configuration, not a capability,
and claiming otherwise would be a lie the scheduler acts on.