xcap
xcap copied to clipboard
XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
以下是我的电脑的设置 ![image](https://github.com/nashaofu/screenshots-rs/assets/59609929/8a8357b4-af5e-40a2-9464-d058b70789e0) 我发现我用这个库获取屏幕列表信息的时候的 `scale_factor` 仍然是 `1`. 以下是我使用 fltk-rs 和 此库 分别获取屏幕 `xywh` 和 `scale_factor` 的值的测试代码和对应输出 ![image](https://github.com/nashaofu/screenshots-rs/assets/59609929/74ea656d-ecd9-4c23-8b2f-6a1324f1ebba) ![image](https://github.com/nashaofu/screenshots-rs/assets/59609929/5cc00c1d-38f8-45d4-bbc6-1563e0d4a387)
在执行`let image_result = screen.capture_area(top_left_x as i32, top_left_y as i32, rect_width, rect_height);`这行代码时,弹出了系统自带的截图弹框,相同的代码在MacOS上无此问题,有什么解决办法吗? ![Screenshot from 2023-09-22 11-23-34](https://github.com/nashaofu/screenshots-rs/assets/29670394/6540da63-1d49-49b4-83a6-862041cc1334) ![Screenshot from 2023-09-22 11-31-39](https://github.com/nashaofu/screenshots-rs/assets/29670394/a8304dd8-74df-4f3b-b12c-4ff45015d57b)
First of all,, thank you very much for a great work. Is it possible to add ability to make screenshots into raw buffer rather than `Result` ? it's very useful...
This doesnt work on kde plasma wayland because the wayshot crate doesnt support that
libwayshot support was included in https://github.com/nashaofu/screenshots-rs/pull/68 on libwayshot 0.2 tag. Since then we have had 0.3 with performance improvements and soon coming `0.x`/`1.x`( if we finalize on stable API). (...
The ability to Compress an image seems to have been removed in 8.0. This feature https://github.com/nashaofu/screenshots-rs/pull/56
Tested on Debian 12 with XFCE and worked. Now compiled same program on Ubuntu 22.04.3 LTS with GNOME and crashes with following error: `thread '' panicked at 'called `Result::unwrap()` on...
调用screen.capture() 错误信息为:拒绝访问 , 0x80070005;
```bash $ wasm-pack build --target nodejs ``` ``` [INFO]: Checking for the Wasm target... [INFO]: Compiling to Wasm... Compiling display-info v0.4.2 error[E0425]: cannot find function `get_all` in this scope -->...
dbus接口:[`org.kde.KWin.ScreenShot2`](https://invent.kde.org/plasma/kwin/-/blob/0683597099cddc1f54966f1546ae8fada3aa7dd6/src/effects/screenshot/org.kde.KWin.ScreenShot2.xml) 1. mkfifo 创建pipe文件 2. 调用 [`CaptureArea`](https://invent.kde.org/plasma/kwin/-/blob/0683597099cddc1f54966f1546ae8fada3aa7dd6/src/effects/screenshot/org.kde.KWin.ScreenShot2.xml#L59-L103) 3. 读取