![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
What a format's header says about an image, before any pixel is decoded. More...
#include <image.h>
Public Attributes | |
| uint32_t | width |
| uint32_t | height |
| uint32_t | frames |
| TinyImageFormat | format |
| uint8_t | channels |
| uint8_t | bit_depth |
| uint8_t | has_alpha |
| uint8_t | progressive |
What a format's header says about an image, before any pixel is decoded.
Filled by tiny_image_probe for every format the library recognizes, including the ones it cannot decode.
Unlike TinyImage, this layout is part of the ABI: the fields are ordered so there is no padding between them, and a host reads them straight out of linear memory at their documented offsets rather than through an accessor apiece. Changing the order or the widths bumps TINYIMG_ABI_VERSION.
| uint8_t TinyImageInfo::bit_depth |
Bits per channel in the file, before decoding normalizes them to 8.
| uint8_t TinyImageInfo::channels |
Channels a full decode would produce.
| TinyImageFormat TinyImageInfo::format |
The format the magic bytes identified.
| uint32_t TinyImageInfo::frames |
Frames the file holds; 1 for a still image.
| uint8_t TinyImageInfo::has_alpha |
Non-zero when the file carries transparency.
| uint32_t TinyImageInfo::height |
Height in pixels.
| uint8_t TinyImageInfo::progressive |
Non-zero for a progressive JPEG, which cannot stream a region.
| uint32_t TinyImageInfo::width |
Width in pixels.