pub fn image_buffer_to_tightly_packed(
buff: &[u8],
width: usize,
height: usize,
stride: usize,
format: ImageFormat,
) -> Result<Vec<u8>, Error>
Expand description
Converts an image buffer to a tightly packed owned buffer.
ยงNotes
- strides less than
width * bytes_per_pixel
are allowed - if the buffer is too small,
InvalidInput
is returned