![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
Represents an image with its width, height, and pixel data. More...
#include <image.h>
Public Attributes | |
| uint32_t | width |
| uint32_t | height |
| uint8_t | channels |
| uint8_t | quality |
| TinyImageFormat | format |
| uint8_t * | data |
| TinyImageMeta * | meta |
Represents an image with its width, height, and pixel data.
The pixel data is stored in a contiguous block of memory, where each pixel is represented by a single byte (grayscale) or multiple bytes (e.g., RGB, RGBA). Rows are tightly packed; there is no stride separate from width * channels.
format records where the pixels came from, or what they will be written as once encoded, and quality the setting a lossy encoder should use. Neither affects the pixel data.
| uint8_t TinyImage::channels |
Bytes per pixel, 1 through 4; see TinyImagePixelType.
| uint8_t* TinyImage::data |
width * height * channels bytes, rows tightly packed.
| TinyImageFormat TinyImage::format |
Where the pixels came from, or what they will be written as.
| uint32_t TinyImage::height |
Height in pixels.
| TinyImageMeta* TinyImage::meta |
EXIF and key value entries, or NULL when there are none.
| uint8_t TinyImage::quality |
Setting a lossy encoder should use, 0 to 100. Zero means the default.
| uint32_t TinyImage::width |
Width in pixels.