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

A parsed matrix and TRC profile. More...

#include <color.h>

Public Attributes

float to_xyz [9]
 Columns of the RGB to XYZ matrix, row major.
float white [3]
float curve [3][256]
uint8_t linear

Detailed Description

A parsed matrix and TRC profile.

The only kind of ICC profile this reads, and between them these cover sRGB, Display P3, Adobe RGB and Rec. 2020, which is what web images carry. A profile whose transform is a lookup table instead is rejected with TINYIMG_ERR_UNSUPPORTED_VARIANT rather than approximated, because an approximation of a printer profile is a wrong color that looks like a right one.

Member Data Documentation

◆ curve

float TinyIccProfile::curve[3][256]

One tone curve per channel, linear light out, sampled at 256 points.

◆ linear

uint8_t TinyIccProfile::linear

Non-zero when every channel's curve is the identity.

◆ to_xyz

float TinyIccProfile::to_xyz[9]

Columns of the RGB to XYZ matrix, row major.

Already adapted to whatever white point the profile's chad tag names, so this maps the profile's RGB straight to D50 connection space.

◆ white

float TinyIccProfile::white[3]

The white point the profile records, as XYZ.


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