JxlDecoderBuilder

Struct JxlDecoderBuilder 

Source
pub struct JxlDecoderBuilder<'pr, 'mm> { /* private fields */ }
Expand description

Builder for JxlDecoder.

Implementations§

Source§

impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>

Source

pub fn pixel_format(&mut self, value: PixelFormat) -> &mut Self

Override desired pixel format

Source

pub fn skip_reorientation(&mut self, value: bool) -> &mut Self

Enables or disables preserving of as-in-bitstream pixel data orientation. If it is set to true, the decoder will skip applying the transformation

§Default

false, and the returned pixel data is re-oriented

Source

pub fn unpremul_alpha(&mut self, value: bool) -> &mut Self

Enables or disables preserving of associated alpha channels. If it is set to true, the colors will be unpremultiplied based on the alpha channel

§Default

false, and return the pixel data “as is”.

Source

pub fn render_spotcolors(&mut self, value: bool) -> &mut Self

Enables or disables rendering spot colors. If it is set to false, then spot colors are not rendered, and have to be retrieved separately. This is useful for printing applications

§Default

true, and spot colors are rendered, which is OK for viewing the decoded image

Source

pub fn coalescing(&mut self, value: bool) -> &mut Self

Enables or disables coalescing of zero-duration frames. For loading a multi-layer still image as separate layers (as opposed to the merged image), coalescing has to be disabled

§Default

true, and all frames have the image dimensions, and are blended if needed.

Source

pub fn desired_intensity_target(&mut self, value: f32) -> &mut Self

Perform tone mapping to the peak display luminance.

§Note

This is provided for convenience and the exact tone mapping that is performed is not meant to be considered authoritative in any way. It may change from version to version

Source

pub fn decompress(&mut self, value: bool) -> &mut Self

Configures whether to get boxes in raw mode or in decompressed mode.

§Default

false, and the boxes are returned in raw mode

Source

pub fn progressive_detail(&mut self, value: JxlProgressiveDetail) -> &mut Self

Configures at which progressive steps in frame decoding

§Default

ProgressiveDetail::DC

Source

pub fn icc_profile(&mut self, value: bool) -> &mut Self

Set if need ICC profile

§Default

false

Source

pub fn init_jpeg_buffer(&mut self, value: usize) -> &mut Self

Set initial buffer for JPEG reconstruction Larger buffer could make reconstruction faster by doing fewer reallocation

Default: 512 KiB

Source

pub fn parallel_runner(&mut self, value: &'pr dyn ParallelRunner) -> &mut Self

Set parallel runner

Source

pub fn memory_manager(&mut self, value: &'mm dyn MemoryManager) -> &mut Self

Set memory manager

Source§

impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>

Source

pub fn build(&mut self) -> Result<JxlDecoder<'pr, 'mm>, DecodeError>

Build a JxlDecoder

§Errors

Return DecodeError::CannotCreateDecoder if it fails to create the decoder.

Trait Implementations§

Source§

impl<'pr, 'mm> Clone for JxlDecoderBuilder<'pr, 'mm>

Source§

fn clone(&self) -> JxlDecoderBuilder<'pr, 'mm>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'pr, 'mm> Default for JxlDecoderBuilder<'pr, 'mm>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'pr, 'mm> Freeze for JxlDecoderBuilder<'pr, 'mm>

§

impl<'pr, 'mm> !RefUnwindSafe for JxlDecoderBuilder<'pr, 'mm>

§

impl<'pr, 'mm> !Send for JxlDecoderBuilder<'pr, 'mm>

§

impl<'pr, 'mm> !Sync for JxlDecoderBuilder<'pr, 'mm>

§

impl<'pr, 'mm> Unpin for JxlDecoderBuilder<'pr, 'mm>

§

impl<'pr, 'mm> !UnwindSafe for JxlDecoderBuilder<'pr, 'mm>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.