Crates.io | screenshot |
lib.rs | screenshot |
version | 0.0.7 |
source | src |
created_at | 2015-01-17 08:54:59.46662 |
updated_at | 2015-12-11 23:55:55.315022 |
description | Get a bitmap image of any display. |
homepage | |
repository | https://github.com/alexchandel/screenshot-rs |
max_upload_size | |
id | 801 |
size | 15,722 |
Get a bitmap image of any display in Rust. This crate is hosted on crates.io.
Contributions welcome!
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();
}
PistonDevelopers/image
doesn't support ARGB pixels.