pub fn encode_alpha(
alpha: &[u8],
width: u32,
height: u32,
) -> CodecResult<Vec<u8>>Expand description
Encode alpha channel into an ALPH chunk payload.
alpha must contain exactly width * height bytes in row-major order.
Returns the complete chunk payload: 1-byte header followed by the
(optionally filtered) alpha data, using no compression.