Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Algebraic color-space model, image specification, provenance, and gain-map metadata.
ColorSpace is an algebraic enum so mutually exclusive states — such as
Oklab carrying BT.709 primaries, CMYK carrying a PQ transfer curve, or an
authoritative ICC profile paired with conflicting primaries — are
unrepresentable by construction.
Modules§
- formats
- Built-in
'staticPixelFormatpreset instances for zero-allocation borrowed views.
Structs§
- Chromaticity
- Validated CIE 1931
(x, y)chromaticity coordinate with bit-exact equality & hashing. - Color
- Single-pixel color value used for explicit alpha matting and fills.
- Color
Origin - Immutable provenance of what the original file claimed on disk.
- Custom
Primaries - Validated custom tristimulus RGB primaries + white point (ICC
cicpTypeamendment, JXL, OpenEXR, PNGcHRM, HAGC Mode 3 / SMPTE ST 2094-50). - Gain
MapComponent - Per-channel ISO 21496-1 gain-map parameters in exact rational form.
- Gain
MapMetadata - ISO 21496-1 / UltraHDR gain-map reconstruction parameters in exact rational form.
- Gamma
- Validated pure power decoding gamma (
L = v^gamma, OETFv^(1/gamma)). - HdrMetadata
- Descriptive HDR container metadata (CLL / ST 2086 mastering display).
- Pixel
Format - Complete, validated description of an interleaved pixel: physical
SampleLayout+ algebraicColorSpace. - Signed
Fraction - Exact unreduced signed rational (
i32 / NonZeroU32) per ISO 21496-1 wire format. - Unsigned
Fraction - Exact unreduced unsigned rational (
u32 / NonZeroU32) per ISO 21496-1 wire format.
Enums§
- Alpha
Mode - Interpretation of an image’s alpha (or padding) channel.
- Color
Error - Validation errors for
PixelFormatandColorSpace. - Color
Space - Authoritative color meaning of pixel samples — an algebraic enum with zero contradictory or impossible combinations.
- Format
Cow - Borrowed-or-owned
PixelFormatcarried insidePixelView<'a>andPixelViewMut<'a>. - Gain
MapChannels - Metadata record arity per ISO 21496-1 §5.2.5.1 — strictly independent of gain-map image channels (1 or 3).
- Gain
MapColor Space - Which rendition’s linear RGB primaries host channelwise gain application (ISO 21496-1
use_base_colour_space). - Gain
MapDirection - Rendition headroom ordering derived from exact rational comparison of
base_hdr_headroomvsalternate_hdr_headroom. - HlgMode
- Interpretation of an HLG signal: bare scene-referred vs explicit BT.2100-3 display rendering.
- IccColor
Space - High-level data color space recorded in an ICC profile header (bytes 16..20).
- IccValidation
Error - Structural validation error for raw ICC profile bytes (ISO 15076-1 / ICC.1).
- Origin
Kind - How the original file signaled its color space.
- Perceptual
Space - Perceptual / cylindrical color spaces beyond Oklab.
- Primaries
- Standardized 1-byte
Copy + constchromaticity primaries (and reference white point) for tristimulus RGB color spaces. - Rendering
Intent - ICC rendering intent.
- Signal
Range - Signal quantization range for integer samples.
- Transfer
- Electro-optical transfer function (non-linear curve between stored values and light).
- White
Point - Reference white point for XYZ, Gray, or custom-primary RGB spaces.
Functions§
- bradford_
adapt_ f64 - Bradford chromatic adaptation matrix from
source_white(x, y)todestination_white(x, y). - validate_
icc_ structure - Validate an ICC profile’s structural framing per ISO 15076-1 / ICC.1: