Skip to main content

bands

Function bands 

Source
pub fn bands<P: AsRef<[u8]>, E>(
    width: u32,
    height: u32,
    out: impl Write,
    piece: impl FnMut(Piece) -> Result<P, E>,
) -> Result<(), Band<E>>
Expand description

A width × height PNG written to out band by band, each band’s pieces from piece — whole tiles while a row of them fits in BAND_BYTES, shorter strips otherwise — its rows streamed to the encoder as each band is had, so what is held at once is one band.