nashaofu
nashaofu
https://github.com/nashaofu/xcap/assets/19303058/cdaa788e-9587-4836-a913-34c75ef26b4d
https://github.com/nashaofu/tauri-xcap-demo/releases/tag/app-v0.0.0. Can you give it a try? I'm working normally here
我这个是和electron的对齐的
> 确认这个bug,再加上3840x2160 w/150%缩放会出现已经获取了display_info: 2560x1440 + 0.6666 scale_factor,再加上fn capture_screen_area里面还乘了一次,然后就获得了原分辨率÷1.5*0.666的一张1706x960的左上角50%不到的局部截图。。。 这是一个错误,我已经在display-info中修复,更新一下lock文件即可
Try to install xcap?
Are you connecting to the host through SSH? Please set the following environment variables, otherwise the operating environment cannot be detected correctly. ``` export DISPLAY=:0 export XDG_SESSION_TYPE=wayland export WAYLAND_DISPLAY=wayland-0 ```
The current return value is RgbaImage, you see if you meet the need,By the way, the latest crate name is xcap
https://github.com/nashaofu/xcap/pull/135 windows 已经支持了,其他平台还在开发
> 发现BRGA转RGBA在一些特定情况下会执行几十秒。大量循环的调用win api且每次返回结果都是一样,导致大量耗时 https://github.com/nashaofu/xcap/blob/v0.0.10/src/windows/capture.rs#L70 > > 例如测试一张`1920*1080`的图片,最坏的情况响应调用win32 api `1980*1080`次。这是很耗时的: > > ```rust > #[test] > fn test_api() { > let start = Instant::now(); > let cn = 1920 * 1080;...
> 发现BRGA转RGBA在一些特定情况下会执行几十秒。大量循环的调用win api且每次返回结果都是一样,导致大量耗时 https://github.com/nashaofu/xcap/blob/v0.0.10/src/windows/capture.rs#L70 > > 例如测试一张`1920*1080`的图片,最坏的情况响应调用win32 api `1980*1080`次。这是很耗时的: > > ```rust > #[test] > fn test_api() { > let start = Instant::now(); > let cn = 1920 * 1080;...