Skip to main content

create_decoder

Function create_decoder 

Source
pub fn create_decoder(
    src: &[u8],
    width: u32,
    height: u32,
    comps: u8,
    bpc: u8,
) -> Result<RunLengthScanlineDecoder, DecodeError>
Expand description

Create a scanline decoder for RunLength-encoded image data.

Validates that src contains enough bytes to decode width × height pixels, then returns a decoder ready to yield one scanline per call.

Mirrors PDFium’s BasicModule::CreateRunLengthDecoder().