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.
DarkAq
DarkAqConfig
Superblock qindex-style AQ modulations, attached to an encode via EncodeConfig::with_boost. Default is the validated preset (Dark AQ on at all distances, scale 4; Variance Boost off).
EncodeConfig
FlMeta
Color / display metadata for the fast-lossless encoders.
JpegTranscodeConfig
Options for encode_jpeg_lossless_with_config.

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).
Speed
Encoder speed/transform-search tradeoff.
TransferFunction
JXL TransferFunction enum (U32Coder).
WhitePoint
JXL WhitePoint enum (U32Coder, 4 enumerants in the named range).

Traits§

BrotliCompression
Optional Brotli encoder used for metadata and JPEG reconstruction data.

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).
encode_jpeg_lossless
Losslessly transcodes a JPEG file into JPEG XL, keeping the ability to reconstruct the original bytes.
encode_jpeg_lossless_with_config