ikon::encode
pub fn bmp<W: Write>(image: &DynamicImage, w: &mut W) -> Result<()>
Converts raster graphics to BMP-encoded buffers.