Skip to main content

encode_image_with_alpha_f32

Function encode_image_with_alpha_f32 

Source
pub fn encode_image_with_alpha_f32(
    input: &[f32],
    width: usize,
    height: usize,
    config: &EncodeConfig,
) -> Result<Vec<u8>, EncodeError>
Expand description

Encode a 32-bit float RGBA image (lossy). input is interleaved [R, G, B, A]; RGB sRGB-encoded in [0, 1], A linear opacity in [0, 1] (quantized to a 16-bit alpha channel).