bmp 0.5.0

Small library for reading and writing BMP images in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[macro_use]
extern crate bmp;
use bmp::{Image, Pixel};

fn main() {
    let mut img = Image::new(256, 256);

    for (x, y) in img.coordinates() {
        img.set_pixel(x, y, px!(x, y, 200));
    }
    let _ = img.save("img.bmp");
}