Expand description
Three-layer public API: Config → Request → Encoder.
use jxl_encoder::{LosslessConfig, LossyConfig, PixelLayout};
// Simple — one line, no request visible
let jxl = LossyConfig::new(1.0)
.encode(&pixels, 800, 600, PixelLayout::Rgb8)?;
// Full control — request layer for metadata, limits, cancellation
let jxl = LosslessConfig::new()
.encode_request(800, 600, PixelLayout::Rgb8)
.encode(&pixels)?;Re-exports§
pub use crate::entropy_coding::Lz77Method;
Macros§
- at
- Start tracing an error with crate metadata for repository links.
Structs§
- Animation
Frame - A single frame in an animation sequence.
- Animation
Params - Animation timing parameters.
- At
- An error with location tracking - wraps any error type.
- Encode
Request - An encoding request — binds config + image dimensions + pixel layout.
- Encode
Result - Result of an encode operation. Holds encoded data and metrics.
- Encode
Stats - Encode metrics collected during encoding.
- Image
Metadata - Image metadata (ICC, EXIF, XMP) to embed in the JXL file.
- Limits
- Resource limits for encoding.
- Lossless
Config - Lossless (modular) encoding configuration.
- Lossy
Config - Lossy (VarDCT) encoding configuration.
- Unstoppable
- A
Stopimplementation that never stops (no cooperative cancellation).
Enums§
- Encode
Error - Encode error type.
- Encode
Mode - Encoding mode.
- Pixel
Layout - Describes the pixel format of input data.
- Quality
- Quality specification for lossy encoding.
Traits§
- Result
AtExt - Extension trait for adding location tracking to
Result<T, At<E>>. - Stop
- Cooperative cancellation check.
Functions§
- at
- Wrap any value in
At<E>and capture the caller’s location.
Type Aliases§
- Result
- Result type for encoding operations.