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).
passcorresponds to a pass of the the Adam7 algorithmlineis the number of a line within a pass (starting with 0). For example, in an image of height 8,linecan be beteween0..4in the 7thpass(those 4 interlaced rows correspond to 2nd, 4th, 6th, and 8th row of the full image).widthdescribes how many pixels are in an interlaced row. For example, in the 7thpass, thewidthis be the same as full image width, but in in the 1stpass, thewidthis be 1/8th of the image width (rounded up as necessary).
Note that in typical usage, Adam7Infos 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§
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