tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyImage Struct Reference

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
TinyImageMetameta

Detailed Description

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.

Member Data Documentation

◆ channels

uint8_t TinyImage::channels

Bytes per pixel, 1 through 4; see TinyImagePixelType.

◆ data

uint8_t* TinyImage::data

width * height * channels bytes, rows tightly packed.

◆ format

TinyImageFormat TinyImage::format

Where the pixels came from, or what they will be written as.

◆ height

uint32_t TinyImage::height

Height in pixels.

◆ meta

TinyImageMeta* TinyImage::meta

EXIF and key value entries, or NULL when there are none.

◆ quality

uint8_t TinyImage::quality

Setting a lossy encoder should use, 0 to 100. Zero means the default.

◆ width

uint32_t TinyImage::width

Width in pixels.


The documentation for this struct was generated from the following file: