Skip to main content

Crate jixel

Crate jixel 

Source

Structs§

ColorEncoding
CICP-style color encoding: which primaries + transfer + rendering intent the original image was authored in. The white point is fixed by the primaries for the named enumerants (e.g. sRGB primaries imply D65), but JXL still carries it as a separate field, so we expose it.
EncodeConfig
FlMeta
Colour / display metadata for the fast-lossless encoders.

Enums§

ColorSpace
JXL ColorSpace enum (2 bits — direct, no U32Coder).
EncodeError
Errors that can occur during JXL encoding.
Orientation
Primaries
JXL Primaries enum (U32Coder).
RenderingIntent
JXL RenderingIntent enum (U32Coder).
TransferFunction
JXL TransferFunction enum (U32Coder).
WhitePoint
JXL WhitePoint enum (U32Coder, 4 enumerants in the named range).

Functions§

distance_from_quality
encode_fast_lossless
encode_fast_lossless_u16
Encode a high-bit-depth image (9..=16 bits).
encode_image
Encode a linear-light RGB Image3F at the given butteraugli distance, using the default color encoding (sRGB primaries, linear transfer).
encode_image_10bit
encode_image_12bit
encode_image_16bit
Encode a 16-bit RGB image. input is interleaved [R, G, B], width * height * 3 samples, each in 0..=65535.
encode_image_f16
Encode a 16-bit-half float RGB image (lossy). Input is f32 in [0, 1]; the stream is declared as f16.
encode_image_f32
Encode a 32-bit float RGB image (lossy). input is interleaved [R, G, B], width * height * 3 samples, each sRGB-encoded in [0, 1].
encode_image_gray
Encode an 8-bit grayscale image. input is width * height luma bytes. The codestream declares a Gray color space, so the decoder emits a single-channel (L) image. Internally the luma is run through the XYB pipeline with R=G=B; the chroma channels are ~constant and cost almost nothing.
encode_image_gray_10bit
Encode a 10-bit grayscale image. input is width * height luma samples (0..=1023).
encode_image_gray_12bit
Encode a 12-bit grayscale image. input is width * height luma samples (0..=4095).
encode_image_gray_16bit
Encode a 16-bit grayscale image. input is width * height luma samples (0..=65535).
encode_image_gray_alpha
encode_image_gray_alpha_10bit
Encode a 10-bit grayscale+alpha image. input is interleaved [L, A] pairs, width * height * 2 samples total, each in 0..=1023.
encode_image_gray_alpha_12bit
Encode a 12-bit grayscale+alpha image. input is interleaved [L, A] pairs, width * height * 2 samples total, each in 0..=4095.
encode_image_gray_alpha_16bit
Encode a 16-bit grayscale+alpha image. input is interleaved [L, A] pairs, width * height * 2 samples total, each in 0..=65535.
encode_image_gray_f16
Encode a 16-bit-half float grayscale image (lossy).
encode_image_gray_f32
Encode a 32-bit float grayscale image (lossy). input is width * height luma samples, sRGB-encoded in [0, 1].
encode_image_with_alpha
Encode a linear-light RGB Image3F at the given butteraugli distance, using the default color encoding (sRGB primaries, linear transfer).
encode_image_with_alpha_10bit
encode_image_with_alpha_12bit
encode_image_with_alpha_16bit
Encode a 16-bit RGBA image. input is interleaved [R, G, B, A], width * height * 4 samples, each in 0..=65535.
encode_image_with_alpha_f16
Encode a 16-bit-half float RGBA image (lossy).
encode_image_with_alpha_f32
Encode a 32-bit float RGBA image (lossy). input is interleaved [R, G, B, A]; RGB sRGB-encoded in [0, 1], A linear opacity in [0, 1] (quantized to a 16-bit alpha channel).