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
-
widthis the width of the image. -
The callback
line_cbis called for each decoded line. The argument is the list of positions of color change, starting with white.If
heightis 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.