![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
A sequence of operations over one source, and the source itself. More...
#include <plan.h>
Public Attributes | |
| const uint8_t * | buffer |
| size_t | size |
| const TinyImage * | image |
| uint32_t | source_width |
| uint32_t | source_height |
| uint8_t | source_channels |
| TinyImageFormat | source_format |
| uint8_t | fusion |
| uint8_t | effort |
| uint8_t | background [4] |
| uint32_t | count |
| TinyPlanOp | ops [TINYIMG_PLAN_MAX_OPS] |
A sequence of operations over one source, and the source itself.
Operations do not run when they are appended. The plan runs once, when tiny_plan_run asks for the output, and the planner decides on the way what to decode and how much of it. That is the whole reason the type exists: a chain that ends at a 100x100 thumbnail of a 16 megapixel photograph should never have 16 megapixels in memory, and it cannot make that decision after the first operation has already run.
Keep one on the stack. The layout is not part of the ABI.
| uint8_t TinyPlan::background[4] |
What padding is filled with, as many channels as the output has.
| const uint8_t* TinyPlan::buffer |
Encoded source bytes, or NULL when the source is already decoded.
| uint32_t TinyPlan::count |
How many operations have been appended.
| uint8_t TinyPlan::effort |
How much work the decode may spend; see tiny_plan_set_effort.
| uint8_t TinyPlan::fusion |
Zero to run one operation per pass; see tiny_plan_set_fusion.
| const TinyImage* TinyPlan::image |
Decoded source, or NULL when the source is encoded. Borrowed.
| TinyPlanOp TinyPlan::ops[TINYIMG_PLAN_MAX_OPS] |
The operations, in the order they were appended.
| size_t TinyPlan::size |
Length of buffer.
| uint8_t TinyPlan::source_channels |
Channels the source decodes to.
| TinyImageFormat TinyPlan::source_format |
The source's container format.
| uint32_t TinyPlan::source_height |
Height of the source in pixels.
| uint32_t TinyPlan::source_width |
Width of the source in pixels.