alexchandel / screenshot-rs

Get a bitmap image of a display in Rust.
The Unlicense
56 stars 25 forks source link

screenshot-rs

Get a bitmap image of any display in Rust. This crate is hosted on crates.io.

Contributions welcome!

Examples

extern crate image;
extern crate screenshot;
use screenshot::get_screenshot;

fn main() {
    let s = get_screenshot(0).unwrap();

    println!("{} x {}", s.width(), s.height());

    image::save_buffer(&Path::new("test.png"),
        s.as_slice(), s.width() as u32, s.height() as u32, image::RGBA(8))
    .unwrap();
}

Development

Known Issues