| Crates.io | screen-shot |
| lib.rs | screen-shot |
| version | 0.0.8 |
| created_at | 2025-11-17 09:50:11.36772+00 |
| updated_at | 2025-11-17 10:21:41.437519+00 |
| description | Get a bitmap image of any display. |
| homepage | |
| repository | https://github.com/ssrlive/screen-shot-rs |
| max_upload_size | |
| id | 1936509 |
| size | 52,344 |
Get a bitmap image of any display in Rust. This crate is hosted on crates.io.
Note: This crate is a fork of alexchandel/screenshot-rs.
Contributions welcome!
use screen_shot::get_screenshot;
{
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();
}
get_screenshot leaks memory on certain error conditions, by returning before releasing OS handles. PR's welcome.PistonDevelopers/image doesn't support ARGB pixels.