pub fn decode_g4(
input: impl Iterator<Item = u8>,
width: u16,
height: Option<u16>,
line_cb: impl FnMut(&[u16])
) -> Option<()>
Expand description
Decode a Group 4 Image
-
width
is the width of the image. -
The callback
line_cb
is called for each decoded line. The argument is the list of positions of color change, starting with white.If
height
is specified, at most that many lines will be decoded, otherwise data is decoded until the end-of-block marker (or end of data).
To obtain an iterator over the pixel colors, the pels
function is provided.