pub trait Decoder {
// Required methods
fn push_pixel(&mut self, white: bool);
fn push_pixel_chunk(&mut self, white: bool, chunk_count: u32);
fn next_line(&mut self);
}Expand description
A decoder for CCITT images.
Required Methods§
Sourcefn push_pixel(&mut self, white: bool)
fn push_pixel(&mut self, white: bool)
Push a single pixel with the given color.
Sourcefn push_pixel_chunk(&mut self, white: bool, chunk_count: u32)
fn push_pixel_chunk(&mut self, white: bool, chunk_count: u32)
Push multiple chunks of 8 pixels of the same color.
The chunk_count parameter indicates how many 8-pixel chunks to push.
For example, if this method is called with white = true and
chunk_count = 10, 80 white pixels are pushed (10 × 8 = 80).
You can assume that this method is only called if the number of already pushed pixels is a multiple of 8 (i.e. byte-aligned).