Expand description
Turning a file into pixels a renderer can take, within a budget.
The order is the design, and each step exists because the one before it made it safe:
crate::measurereads the header. Nothing is allocated.crate::budgetdecides whether this may be decoded at all, and at what size.- The decoder runs under
image’s ownLimits, so a file whose header lied is refused while allocating rather than after. - The EXIF orientation is applied — ours to apply, because the
renderer only does it for handle kinds a viewer cannot use. See
crate::orientation. - The result is resized down to the budget and handed over as RGBA8.
Structs§
- Decoded
- A decoded picture, ready to become a renderer’s handle.
Functions§
- decode_
to_ fit - Decodes
pathto fit withinbudget.