Skip to main content

Module export

Module export 

Source
Expand description

Encoder selection and per-implementation configuration.

EncodeOptions mirrors DecodeOptions: it is an implementation-keyed enum — each variant names one output format and one backend, and carries that backend’s configuration struct. A format that gains an alternative encoder simply gains another variant; there is no generic, implementation-agnostic option set.

EncodeOptions is #[non_exhaustive] so the planned C/C++ encoder backends (libjpeg-turbo, MozJPEG, jpegli, libaom, SVT-AV1) can be added without a breaking change. Their configuration structs are already defined below — see MozjpegEncodeConfig and friends — so the API surface is stable ahead of the implementations. The libjxl backend (LibjxlEncodeConfig) is wired up behind the jxl-encode-libjxl feature.

Structs§

CommonEncodeOptions
Encoder-agnostic options shared by every backend.
JpegEncEncodeConfig
Configuration for the jpeg-encoder (pure-Rust) JPEG encoder.
JpegliEncodeConfig
Configuration for the planned jpegli JPEG encoder.
LibaomEncodeConfig
Configuration for the planned libaom AVIF encoder.
LibjpegTurboEncodeConfig
Configuration for the planned libjpeg-turbo JPEG encoder.
LibjxlEncodeConfig
Configuration for the libjxl JPEG XL encoder (the reference encoder).
LibwebpEncodeConfig
Configuration for the libwebp WebP encoder.
MetadataEmbedOptions
Controls which metadata blocks an encoder embeds into its output container.
MozjpegEncodeConfig
Configuration for the planned MozJPEG JPEG encoder.
RavifEncodeConfig
Configuration for the ravif (rav1e) AVIF encoder.
SvtAv1EncodeConfig
Configuration for the planned SVT-AV1 AVIF encoder.
ZuneJxlEncodeConfig
Configuration for the zune-jpegxl JPEG XL encoder (JxlSimpleEncoder).
ZunePngEncodeConfig
Configuration for the zune-png PNG encoder.

Enums§

AvifRateControl
Rate-control strategy for AV1-based AVIF encoders.
BitDepth
Bits per pixel sample of an encoded image.
EncodeOptions
Selects the encoder implementation and carries its configuration.
JpegSubsampling
Chroma subsampling mode for JPEG encoders.
LibjxlColorTransform
Internal color transform for the libjxl encoder (JXL_ENC_FRAME_SETTING_COLOR_TRANSFORM).
LibjxlModular
Modular vs VarDCT mode for the libjxl encoder (JXL_ENC_FRAME_SETTING_MODULAR).
OutputFormat
An output container format produced by an EncodeOptions variant.
WebPMode
WebP encoding mode.