Skip to main content

JxlDecoderOptions

Struct JxlDecoderOptions 

Source
#[non_exhaustive]
pub struct JxlDecoderOptions { pub adjust_orientation: bool, pub render_spot_colors: bool, pub coalescing: bool, pub desired_intensity_target: Option<f32>, pub skip_preview: bool, pub progressive_mode: JxlProgressiveMode, pub cms: Option<Box<dyn JxlCms>>, pub high_precision: bool, pub premultiply_output: bool, pub limits: JxlDecoderLimits, pub stop: Arc<dyn Stop>, pub parallel: bool, }

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§adjust_orientation: bool§render_spot_colors: bool§coalescing: bool§desired_intensity_target: Option<f32>§skip_preview: bool§progressive_mode: JxlProgressiveMode§cms: Option<Box<dyn JxlCms>>§high_precision: bool

Use high precision mode for decoding. When false (default), uses lower precision settings that match libjxl’s default. When true, uses higher precision at the cost of performance.

This affects multiple decoder decisions including spline rendering precision and potentially intermediate buffer storage (e.g., using f32 vs f16).

§premultiply_output: bool

If true, multiply RGB by alpha before writing to output buffer. This produces premultiplied alpha output, which is useful for compositing. Default: false (output straight alpha)

§limits: JxlDecoderLimits

Security limits to prevent resource exhaustion attacks. Use JxlDecoderLimits::restrictive() for untrusted input.

§stop: Arc<dyn Stop>

Cooperative cancellation / timeout handle. Default: Arc::new(enough::Unstoppable) (no cancellation).

§parallel: bool

Enable parallel decoding and rendering using rayon.

When true (the default when the threads feature is enabled), group decoding and rendering are parallelized across rayon’s global thread pool. Control thread count via RAYON_NUM_THREADS or rayon::ThreadPoolBuilder::build_global().

When false, all decoding is single-threaded.

Trait Implementations§

Source§

impl Default for JxlDecoderOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.