pub struct Adam7Info {
pub(crate) pass: u8,
pub(crate) line: u32,
pub(crate) width: u32,
pub(crate) samples: u32,
}Expand description
Describes which stage of the Adam7 algorithm applies to a decoded row.
See also Reader::next_interlaced_row.
Fields§
§pass: u8The Adam7 pass number, 1..7.
line: u32The index of the line within this pass.
width: u32The original pixel count.
samples: u32How many Adam7 samples there are.
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 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 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.
fn pass_constants(&self) -> PassConstants
Sourcefn splat_pixel_repeat(self, idx: usize) -> u8
fn splat_pixel_repeat(self, idx: usize) -> u8
How often to repeat a pixel.
fn splat_line_repeat(self, height: u32) -> u8
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 UnsafeUnpin 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