pub struct LibjxlEncodeConfig {Show 21 fields
pub common: CommonEncodeOptions,
pub distance: f32,
pub quality: Option<f32>,
pub lossless: bool,
pub effort: u8,
pub brotli_effort: i8,
pub decoding_speed: u8,
pub progressive: bool,
pub modular: LibjxlModular,
pub color_transform: LibjxlColorTransform,
pub epf: i8,
pub gaborish: Option<bool>,
pub noise: Option<bool>,
pub dots: Option<bool>,
pub patches: Option<bool>,
pub photon_noise_iso: f32,
pub resampling: i8,
pub use_container: bool,
pub codestream_level: i8,
pub extra_int_options: Vec<(i32, i64)>,
pub extra_float_options: Vec<(i32, f32)>,
}Expand description
Configuration for the libjxl JPEG XL encoder (the reference encoder).
Unlike the zune-jpegxl default (ZuneJxlEncodeConfig), libjxl honours
8- and 16-bit output, mathematically lossless encoding, and the full set of
JxlEncoderFrameSettingId toggles. Requires the jxl-encode-libjxl feature.
Integer fields default to a -1 sentinel and Option fields to None,
meaning “leave at libjxl’s own default”. This is a plain struct (not
#[non_exhaustive]): construct it with a struct literal plus
..Default::default(). The two extra_*_options vectors are escape hatches
that pass raw frame-setting ids through verbatim, so every libjxl toggle is
reachable even if it has no dedicated field.
Fields§
§common: CommonEncodeOptionsEncoder-agnostic options. libjxl honours BitDepth::Eight and BitDepth::Sixteen.
distance: f32Butteraugli distance: 0.0 is mathematically lossless, 1.0 visually
lossless, up to 25.0 (smaller files, monotonic). Ignored when quality
is Some or lossless is true.
quality: Option<f32>Optional JPEG-style quality, 0.0..=100.0. When Some, libjxl converts
it to a distance and it overrides distance.
lossless: boolForce bit-exact lossless encoding (overrides distance/quality).
effort: u8Effort / speed-quality trade-off, 1 (fastest) ..= 10 (slowest, best).
brotli_effort: i8Brotli effort for the metadata/modular streams, -1 (default) or 0..=11.
decoding_speed: u8Decoder-speed tier the stream is optimised for, 0 (default, best) ..= 4.
progressive: boolEmit a responsive / progressive stream (sets RESPONSIVE + PROGRESSIVE_DC).
modular: LibjxlModularModular vs VarDCT mode.
color_transform: LibjxlColorTransformInternal color transform.
epf: i8Edge-preserving filter strength, -1 (default) ..= 3.
gaborish: Option<bool>Gaborish deblocking filter: None = default, Some(false)/Some(true) = off/on.
noise: Option<bool>Adaptive noise synthesis: None = default, Some(false)/Some(true) = off/on.
dots: Option<bool>Dots synthesis: None = default, Some(false)/Some(true) = off/on.
patches: Option<bool>Patches synthesis: None = default, Some(false)/Some(true) = off/on.
photon_noise_iso: f32Photon-noise simulation strength in ISO units (0.0 = off).
resampling: i8Downsampling factor, -1 (default), 1, 2, 4, or 8.
use_container: boolForce the BMFF container even when a bare codestream would do.
codestream_level: i8JPEG XL codestream feature level: -1 (auto), 5, or 10.
extra_int_options: Vec<(i32, i64)>Escape hatch: raw (JxlEncoderFrameSettingId, value) integer settings
applied verbatim, for any toggle without a dedicated field above.
extra_float_options: Vec<(i32, f32)>Escape hatch: raw (JxlEncoderFrameSettingId, value) float settings.
Trait Implementations§
Source§impl Clone for LibjxlEncodeConfig
impl Clone for LibjxlEncodeConfig
Source§fn clone(&self) -> LibjxlEncodeConfig
fn clone(&self) -> LibjxlEncodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LibjxlEncodeConfig
impl Debug for LibjxlEncodeConfig
Source§impl Default for LibjxlEncodeConfig
impl Default for LibjxlEncodeConfig
Source§impl<'de> Deserialize<'de> for LibjxlEncodeConfig
impl<'de> Deserialize<'de> for LibjxlEncodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for LibjxlEncodeConfig
impl PartialEq for LibjxlEncodeConfig
Source§fn eq(&self, other: &LibjxlEncodeConfig) -> bool
fn eq(&self, other: &LibjxlEncodeConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LibjxlEncodeConfig
impl Serialize for LibjxlEncodeConfig
impl StructuralPartialEq for LibjxlEncodeConfig
Auto Trait Implementations§
impl Freeze for LibjxlEncodeConfig
impl RefUnwindSafe for LibjxlEncodeConfig
impl Send for LibjxlEncodeConfig
impl Sync for LibjxlEncodeConfig
impl Unpin for LibjxlEncodeConfig
impl UnsafeUnpin for LibjxlEncodeConfig
impl UnwindSafe for LibjxlEncodeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
Source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more