#screenshot

screenshot_desktop

Take a screenshot of a screen

1 unstable release

0.1.0 Aug 7, 2024

#22 in #screenshot

Download history 124/week @ 2024-08-05 1/week @ 2024-08-12 18/week @ 2024-09-16 13/week @ 2024-09-23 19/week @ 2024-09-30 5/week @ 2024-10-07

55 downloads per month

MIT/Apache

11KB
92 lines

Screenshot_desktop

Take a screenshot of a screen;

Crates.io License Crates.io Version

Usage

First, add screenshot to your project by cargo.

use std::path::Path;
use screenshot_desktop::Screenshot;

fn main(){
    let _ = match Screenshot::new() {
        Ok(screenshot) => {
            screenshot.save(&Path::new("screenshot.png")).map_err(|e| e.to_string())
        },
        Err(_) => {
            Err("Failed to capture screenshot".to_string())
        },
    };
}

Supported Platform

Platform/平台 status/状态
Windows Done
Linux Come Soon
Macos Come Soon

License

MIT + Apache-2.0

Dependencies

~3MB
~57K SLoC