Skip to main content

encode_rgba8

Function encode_rgba8 

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

Encode a packed 8-bit RGBA image to HEIC. Alpha is discarded. Use encode_rgba8_with_alpha to preserve it.

rgba must hold exactly width * height * 4 bytes in R, G, B, A order.