Crates.io | captis |
lib.rs | captis |
version | 0.6.1 |
source | src |
created_at | 2022-05-30 07:29:30.857574 |
updated_at | 2022-08-13 03:31:17.102705 |
description | A Screen capturing library built for Linux, Windows and MacOS. |
homepage | https://github.com/crewnew/captis |
repository | |
max_upload_size | |
id | 596838 |
size | 33,918 |
It's a fairly simple library that performs good enough, the OS level APIs that were used are inspired by python-mss.
To run this code you also need to add image crate to your project and enable the jpeg feature, otherwise you won't be able to save the file as JPEG.
The same goes for any other format as well, if you wanna treat the image as PNG you must enable png feature. Check their documentation to see which formats are available.
use captis::init_capturer;
let capturer = init_capturer().expect("Couldn't Initialize Capturer");
let image = capturer.capture(0).expect("Couldn't Capture Screen");
image.save("test.jpeg").expect("Couldn't Save Image");
If any help needed feel free to contact rust@crnw.uk