Function encode_max_len

pub fn encode_max_len(width: u32, height: u32, channels: impl Into<u8>) -> usize

The maximum number of bytes the encoded image will take.

Can be used to pre-allocate the buffer to encode the image into.