pub struct Packed { /* private fields */ }Expand description
Decoded-but-not-unpacked samples, with everything needed to walk them.
This is the state the filter chain leaves an image in for every path that
does not go through a codec of its own: raw samples at Depth, in the
colour space’s own component order, still packed. The /Decode array is
already folded into a byte table, so unpacking a sample is a lookup.
Implementations§
Source§impl Packed
impl Packed
Sourcepub fn new(
data: Box<[u8]>,
depth: Depth,
components: usize,
pitch: usize,
width: u32,
height: u32,
space: &ColorSpace,
decode: Option<&Array>,
) -> Self
pub fn new( data: Box<[u8]>, depth: Depth, components: usize, pitch: usize, width: u32, height: u32, space: &ColorSpace, decode: Option<&Array>, ) -> Self
Hold data as width x height samples of components at depth,
with the /Decode mapping for space folded into the table.
pitch is the dictionary’s own row stride, which for a packed depth is
wider than width * components * depth / 8 rounded down: a row is
byte-aligned, so the tail bits of the last byte belong to no pixel.
Sourcepub const fn components(&self) -> usize
pub const fn components(&self) -> usize
Components per pixel.
Trait Implementations§
impl StructuralPartialEq for Packed
Auto Trait Implementations§
impl Freeze for Packed
impl RefUnwindSafe for Packed
impl Send for Packed
impl Sync for Packed
impl Unpin for Packed
impl UnsafeUnpin for Packed
impl UnwindSafe for Packed
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