Skip to main content

encode_rgba12

Function encode_rgba12 

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

Encode a 12-bit RGBA image to HEIC. Alpha is discarded.

rgba must hold exactly width * height * 4 samples in R, G, B, A order, each in 0..=4095, packed as u16.