#[non_exhaustive]pub struct Component {
pub width: u32,
pub height: u32,
pub bit_depth: u8,
pub signed: bool,
pub x_sampling: u8,
pub y_sampling: u8,
pub samples: Vec<i32>,
}Expand description
One decoded component: its own sample grid, its declared depth and sign, and the sub-sampling that maps it onto the image’s reference grid.
samples is row-major, width * height entries, each already
DC-level-shifted and clamped to the declared depth.
#[non_exhaustive], like Image; build one by hand with
Component::new.
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.width: u32Component width in samples.
height: u32Component height in samples.
bit_depth: u8Bits per sample as declared in SIZ Ssiz (1..=32).
signed: boolWhether samples are signed (SIZ component sign bit).
x_sampling: u8Horizontal sub-sampling factor (SIZ XRsiz); 1 means unit sampling.
y_sampling: u8Vertical sub-sampling factor (SIZ YRsiz); 1 means unit sampling.
samples: Vec<i32>width * height samples, row-major.
Implementations§
Trait Implementations§
impl Eq for Component
impl StructuralPartialEq for Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more