pub struct JxlDecoderBuilder<'pr, 'mm> { /* private fields */ }Expand description
Builder for JxlDecoder.
Implementations§
Source§impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>
impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>
Sourcepub fn pixel_format(&mut self, value: PixelFormat) -> &mut Self
pub fn pixel_format(&mut self, value: PixelFormat) -> &mut Self
Override desired pixel format
Sourcepub fn skip_reorientation(&mut self, value: bool) -> &mut Self
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
Sourcepub fn unpremul_alpha(&mut self, value: bool) -> &mut Self
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”.
Sourcepub fn render_spotcolors(&mut self, value: bool) -> &mut Self
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
Sourcepub fn coalescing(&mut self, value: bool) -> &mut Self
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.
Sourcepub fn desired_intensity_target(&mut self, value: f32) -> &mut Self
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
Sourcepub fn decompress(&mut self, value: bool) -> &mut Self
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
Sourcepub fn progressive_detail(&mut self, value: JxlProgressiveDetail) -> &mut Self
pub fn progressive_detail(&mut self, value: JxlProgressiveDetail) -> &mut Self
Sourcepub fn icc_profile(&mut self, value: bool) -> &mut Self
pub fn icc_profile(&mut self, value: bool) -> &mut Self
Sourcepub fn init_jpeg_buffer(&mut self, value: usize) -> &mut Self
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
Sourcepub fn parallel_runner(&mut self, value: &'pr dyn ParallelRunner) -> &mut Self
pub fn parallel_runner(&mut self, value: &'pr dyn ParallelRunner) -> &mut Self
Set parallel runner
Sourcepub fn memory_manager(&mut self, value: &'mm dyn MemoryManager) -> &mut Self
pub fn memory_manager(&mut self, value: &'mm dyn MemoryManager) -> &mut Self
Set memory manager
Source§impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>
impl<'pr, 'mm> JxlDecoderBuilder<'pr, 'mm>
Sourcepub fn build(&mut self) -> Result<JxlDecoder<'pr, 'mm>, DecodeError>
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>
impl<'pr, 'mm> Clone for JxlDecoderBuilder<'pr, 'mm>
Source§fn clone(&self) -> JxlDecoderBuilder<'pr, 'mm>
fn clone(&self) -> JxlDecoderBuilder<'pr, 'mm>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more