bmp-monochrome

Encode and decode monochromatic bitmaps without additional dependencies, useful for QR codes.

Example

```rust use bmp_monochrome::Bmp; use std::error::Error; use std::fs::File;

fn main() -> Result<(), Box> { let filename = "test.bmp"; let width = 21; let data: Vec = (0..width * width).map(|e| e % 2 == 0).collect(); let bmp = Bmp::new(data, width)?; bmp.write(File::create(filename)?)?; let bmpread = Bmp::read(File::open(filename)?)?; asserteq!(bmp, bmpread); Ok(()) } ```

Generates

test

Minimum Supported Rust Version (MSRV)

Rust 1.32

Use tolebytes introduced in 1.32.0