snappy_sc - Fast Screen Capture Library in Rust

snappy_sc is a minimal, fast and efficient screen capture library written in Rust. The library is designed to work across multiple platforms, although it currently only supports Windows. Further platform support is in development.

This library is used as the core component in the Snappy screen capture application, which is still under active development.

Features

Getting Started

Prerequisites

Ensure you have Rust and Cargo installed on your system. If you don't have them installed, follow the instructions on the official Rust website.

Installation

Add snappy_sc as a dependency in your Cargo.toml:

toml [dependencies] snappy_sc = "0.1.0"

Then, include the library in your Rust code:

rust extern crate snappy_sc;

Usage

To use the snappy_sc library, you can call the primary screen capture function:

```rust use snappysc::{getfocuseddisplayinfo, take_screenshot};

fn main() { let (displayid, width, height) = getfocuseddisplayinfo().unwrap(); let options = ScreenshotOptions { displayid, region: None, outputformat: OutputFormat::Png, }; let output: Vec = take_screenshot(&options).unwrap(); // Process the output here

// for example, save to file
let mut file = File::create("screenshot.png").unwrap();
file.write_all(&output).unwrap();

} ```

Contributing

We welcome contributions from the community! If you'd like to contribute to snappy_sc, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and commit them to your branch.
  4. Open a pull request, describing your changes and why they should be merged.

License

snappy_sc is released under the MIT License. You are free to use, modify, and distribute the library for both personal and commercial purposes.