pub struct DecodingOptions { /* private fields */ }Implementations§
Source§impl DecodingOptions
impl DecodingOptions
pub fn version(&self) -> u8
Sourcepub fn ignore_transformations(&self) -> bool
pub fn ignore_transformations(&self) -> bool
Ignore geometric transformations like cropping, rotation, mirroring. Default: false (do not ignore).
pub fn set_ignore_transformations(&mut self, enable: bool)
pub fn convert_hdr_to_8bit(&self) -> bool
pub fn set_convert_hdr_to_8bit(&mut self, enable: bool)
Sourcepub fn strict_decoding(&self) -> bool
pub fn strict_decoding(&self) -> bool
When strict decoding is enabled, an error is returned for invalid input.
Otherwise, it will try its best and add decoding warnings to
the decoded Image. Default is non-strict.
pub fn set_strict_decoding(&mut self, enable: bool)
Sourcepub fn decoder_id(&self) -> Option<&str>
pub fn decoder_id(&self) -> Option<&str>
ID of the decoder to use for the decoding.
If set to None (default), the highest priority decoder is chosen.
The priority is defined in the plugin.
pub fn set_decoder_id( &mut self, decoder_id: Option<&str>, ) -> Result<(), HeifError>
pub fn color_conversion_options(&self) -> ColorConversionOptions
pub fn set_color_conversion_options(&mut self, options: ColorConversionOptions)
pub fn alpha_composition_mode(&self) -> AlphaCompositionMode
v1_20 only.pub fn set_alpha_composition_mode(&mut self, v: AlphaCompositionMode)
v1_20 only.Sourcepub fn ignore_sequence_edit_list(&self) -> bool
Available on crate feature v1_21 only.
pub fn ignore_sequence_edit_list(&self) -> bool
v1_21 only.If enabled, it will decode the media timeline, ignoring the sequence tracks edit-list.
Sourcepub fn set_ignore_sequence_edit_list(&mut self, v: bool)
Available on crate feature v1_21 only.
pub fn set_ignore_sequence_edit_list(&mut self, v: bool)
v1_21 only.If enabled, it will decode the media timeline, ignoring the sequence tracks edit-list.
pub fn output_image_nclx_profile(&self) -> Option<&ColorProfileNCLX>
v1_21 only.pub fn set_output_image_nclx_profile(&mut self, v: Option<ColorProfileNCLX>)
v1_21 only.Sourcepub fn num_library_threads(&self) -> u32
Available on crate feature v1_21 only.
pub fn num_library_threads(&self) -> u32
v1_21 only.0 = let libheif decide (TODO, currently ignored)
Sourcepub fn set_num_library_threads(&mut self, v: u32)
Available on crate feature v1_21 only.
pub fn set_num_library_threads(&mut self, v: u32)
v1_21 only.0 = let libheif decide (TODO, currently ignored)
Sourcepub fn num_codec_threads(&self) -> u32
Available on crate feature v1_21 only.
pub fn num_codec_threads(&self) -> u32
v1_21 only.0 = use decoder default
Sourcepub fn set_num_codec_threads(&mut self, v: u32)
Available on crate feature v1_21 only.
pub fn set_num_codec_threads(&mut self, v: u32)
v1_21 only.0 = use decoder default
Sourcepub fn autocorrect_broken_input(&self) -> bool
Available on crate feature v1_23 only.
pub fn autocorrect_broken_input(&self) -> bool
v1_23 only.If enabled, libheif will attempt to work around known broken-input quirks
(e.g. Sony HIF files where the NCLX colr box disagrees with the HEVC VUI
on the YCbCr range flag).
Default: false (strict spec-conformant behavior).
pub fn set_autocorrect_broken_input(&mut self, v: bool)
v1_23 only.Sourcepub fn output_image_nclx_profile_passthrough(&self) -> bool
Available on crate feature v1_23 only.
pub fn output_image_nclx_profile_passthrough(&self) -> bool
v1_23 only.Controls the meaning of output_image_nclx_profile == None.
When false (default), a None output_image_nclx_profile means
“convert the decoded image to sRGB” (BT.709 primaries, sRGB transfer,
BT.601 matrix, full-range).
For HDR inputs (e.g. BT.2100 PQ) this silently discards the original
color volume.
When true, a None output_image_nclx_profile means “keep the input
image’s NCLX”.
The decoded image carries the input file’s primaries / transfer / matrix / range,
and no extra color-space conversion is performed solely because
the output NCLX was unspecified.
If a YCbCr<->RGB colorspace conversion fires for another reason,
the input NCLX is used to drive that conversion (so the result is
tagged consistently with the source).
Although this flag is off by default to preserve historical behavior,
new code that wants to preserve HDR through decoding should generally
enable it.
Setting output_image_nclx_profile to a non-None value overrides this flag.
pub fn set_output_image_nclx_profile_passthrough(&mut self, v: bool)
v1_23 only.