Struct Adam7Info
pub struct Adam7Info { /* private fields */ }
Describes which stage of the Adam7 algorithm applies to a decoded row.
See also Reader::next_interlaced_row.
Implementations
impl Adam7Info
fn new(pass: u8, line: u32, width: u32) -> SelfCreates a new
Adam7Info. May panic if the arguments are out of range (e.g. ifpassis 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 a full row of the image. The bytes in each passline of the Adam7 are calculated from this number.
Note that in typical usage,
Adam7Infos are returned byReader::next_interlaced_rowand there is no need to create them by callingAdam7Info::new.Adam7Info::newis nevertheless exposed as a public API, because it helps to provide self-contained example usage ofexpand_interlaced_row.
Trait Implementations
impl Clone for Adam7Info
fn clone(&self) -> Self
impl Copy for Adam7Info
impl Debug for Adam7Info
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Adam7Info
impl PartialEq for Adam7Info
fn eq(&self, other: &Self) -> bool