#[non_exhaustive]pub struct JxlBasicInfo {
pub size: (usize, usize),
pub coded_size: (usize, usize),
pub bit_depth: JxlBitDepth,
pub orientation: Orientation,
pub intrinsic_orientation: Orientation,
pub extra_channels: Vec<JxlExtraChannel>,
pub animation: Option<JxlAnimation>,
pub uses_original_profile: bool,
pub tone_mapping: ToneMapping,
pub preview_size: Option<(usize, usize)>,
pub intrinsic_size: Option<(usize, usize)>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: (usize, usize)Dimensions of the pixel data the decoder will emit, in the order the
output buffer must be laid out ((width, height)).
This depends on JxlDecoderOptions::adjust_orientation:
- When orientation is adjusted (the default, “Correct”), the stored
orientation is baked into the output, so this is the display size
(width/height are swapped relative to
Self::coded_sizefor transposing orientations). - When orientation adjustment is disabled (“Preserve”), pixels are
emitted in their stored orientation, so this equals
Self::coded_size.
Allocate output buffers against this size.
coded_size: (usize, usize)The stored (coded) dimensions of the image as written in the codestream,
(width, height), before any orientation is applied. Unaffected by
JxlDecoderOptions::adjust_orientation. For transposing orientations
this differs from the display size; see Self::size.
bit_depth: JxlBitDepth§orientation: OrientationOrientation of the pixels the decoder emits, i.e. the residual transform a caller must still apply to obtain an upright image.
This depends on JxlDecoderOptions::adjust_orientation:
- When orientation is adjusted (the default, “Correct”), the stored
orientation has already been baked into the output pixels, so this is
Orientation::Identity. - When orientation adjustment is disabled (“Preserve”), this is the
image’s stored orientation (equal to
Self::intrinsic_orientation), which the caller should bake into theSelf::coded_sizepixels to display them upright.
intrinsic_orientation: OrientationThe image’s intrinsic (stored) EXIF/container orientation as written in
the codestream, regardless of JxlDecoderOptions::adjust_orientation.
Use this to re-tag re-encoded output or to decide how to bake the stored
orientation. In “Correct” mode the emitted pixels are already upright
even though this reports a non-Identity value; in “Preserve” mode this
equals Self::orientation.
extra_channels: Vec<JxlExtraChannel>§animation: Option<JxlAnimation>§uses_original_profile: bool§tone_mapping: ToneMapping§preview_size: Option<(usize, usize)>§intrinsic_size: Option<(usize, usize)>Intrinsic display size, if different from coded size.
When present, the image should be rendered at this (width, height)
rather than the coded size. Used for resolution-independence
(e.g. a 4000×3000 image meant to display at 2000×1500).
Trait Implementations§
Source§impl Clone for JxlBasicInfo
impl Clone for JxlBasicInfo
Source§fn clone(&self) -> JxlBasicInfo
fn clone(&self) -> JxlBasicInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more