write_bmp

Function write_bmp 

Source
pub fn write_bmp(
    buffer: &mut [u8],
    width: usize,
    height: usize,
    pixels: &[u8],
) -> Result<usize, Error>
Expand description

Write a valid BMP file into the provided buffer, returning the number of bytes written.

The buffer can be longer than required. Extra space will remain untouched. See documentation on the Error enum for possible errors.