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, libjxl) 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.
Structs§
- Common
Encode Options - Encoder-agnostic options shared by every backend.
- Jpeg
EncEncode Config - Configuration for the
jpeg-encoder(pure-Rust) JPEG encoder. - Jpegli
Encode Config - Configuration for the planned jpegli JPEG encoder.
- Libaom
Encode Config - Configuration for the planned libaom AVIF encoder.
- Libjpeg
Turbo Encode Config - Configuration for the planned libjpeg-turbo JPEG encoder.
- Libjxl
Encode Config - Configuration for the planned libjxl JPEG XL encoder.
- Libwebp
Encode Config - Configuration for the
libwebpWebP encoder. - Metadata
Embed Options - Controls which metadata blocks an encoder embeds into its output container.
- Mozjpeg
Encode Config - Configuration for the planned MozJPEG JPEG encoder.
- Ravif
Encode Config - Configuration for the
ravif(rav1e) AVIF encoder. - SvtAv1
Encode Config - Configuration for the planned SVT-AV1 AVIF encoder.
- Zune
JxlEncode Config - Configuration for the
zune-jpegxlJPEG XL encoder (JxlSimpleEncoder). - Zune
PngEncode Config - Configuration for the
zune-pngPNG encoder.
Enums§
- Avif
Rate Control - Rate-control strategy for AV1-based AVIF encoders.
- BitDepth
- Bits per pixel sample of an encoded image.
- Encode
Options - Selects the encoder implementation and carries its configuration.
- Jpeg
Subsampling - Chroma subsampling mode for JPEG encoders.
- Output
Format - An output container format produced by an
EncodeOptionsvariant. - WebP
Mode - WebP encoding mode.