pub fn encode( color: Color, (width, height): (u32, u32), data: impl AsRef<[u8]>, to: &mut impl Write ) -> Result<()>
Encode a BMP/DIB.
if your width * height * color depth isnt data’s length