pub struct Adam7Info { /* private fields */ }
Expand description
Describes which stage of the Adam7 algorithm applies to a decoded row.
See also Reader.next_interlaced_row.
Implementations§
source§impl Adam7Info
impl Adam7Info
sourcepub fn new(pass: u8, line: u32, width: u32) -> Self
pub fn new(pass: u8, line: u32, width: u32) -> Self
Creates a new Adam7Info
. May panic if the arguments are out of range (e.g. if pass
is
0 or greater than 8).
pass
corresponds to a pass of the the Adam7 algorithmline
is the number of a line within a pass (starting with 0). For example, in an image of height 8,line
can be beteween0..4
in the 7thpass
(those 4 interlaced rows correspond to 2nd, 4th, 6th, and 8th row of the full image).width
describes how many pixels are in an interlaced row. For example, in the 7thpass
, thewidth
is be the same as full image width, but in in the 1stpass
, thewidth
is be 1/8th of the image width (rounded up as necessary).
Note that in typical usage, Adam7Info
s are returned by [Reader.next_interlaced_row]
and there is no need to create them by calling Adam7Info::new
. Adam7Info::new
is
nevertheless exposed as a public API, because it helps to provide self-contained example
usage of expand_interlaced_row.
Trait Implementations§
source§impl PartialEq for Adam7Info
impl PartialEq for Adam7Info
impl Copy for Adam7Info
impl Eq for Adam7Info
impl StructuralPartialEq for Adam7Info
Auto Trait Implementations§
impl Freeze for Adam7Info
impl RefUnwindSafe for Adam7Info
impl Send for Adam7Info
impl Sync for Adam7Info
impl Unpin for Adam7Info
impl UnwindSafe for Adam7Info
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)