Skip to main content

encode

Function encode 

Source
pub fn encode(
    width: u32,
    height: u32,
    rgba: &[u8],
) -> Result<Vec<u8>, EncodeError>
Expand description

encode RGBA pixels to .li format bytes using default options.

§Errors

returns an error if the pixel buffer size does not match width * height * 4.