screenshot_desktop 0.1.0

Take a screenshot of a screen
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 3 items with examples
  • Size
  • Source code size: 35.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 563.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 59s Average build duration of successful builds.
  • all releases: 59s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • GuoJikun/screenshot
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • GuoJikun

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