Skip to content

feat: 添加窗口区域截图功能#182

Open
Waitfish wants to merge 2 commits intonashaofu:masterfrom
Waitfish:add_capture_region
Open

feat: 添加窗口区域截图功能#182
Waitfish wants to merge 2 commits intonashaofu:masterfrom
Waitfish:add_capture_region

Conversation

@Waitfish
Copy link
Copy Markdown

@Waitfish Waitfish commented Jan 3, 2025

在某些情况下,仅需获取窗口特定固定区域的截图内容,直接截取全部内容需要耗费更多资源。

@nashaofu
Copy link
Copy Markdown
Owner

nashaofu commented Jan 4, 2025

你这个和直接获取整个窗口截图后再调用Crop不是一样的吗

@Waitfish
Copy link
Copy Markdown
Author

Waitfish commented Jan 5, 2025

我的电脑直接截一个满屏的窗口要500ms以上,截我想要的部分只要20ms

@nashaofu
Copy link
Copy Markdown
Owner

nashaofu commented Jan 5, 2025

release 模式也要这么长时间?多大分辨率的显示器

@Waitfish
Copy link
Copy Markdown
Author

Waitfish commented Jan 9, 2025

显示器是4K的,我用两个example对比了一下。
pr2

pr

Copy link
Copy Markdown
Author

@Waitfish Waitfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 添加窗口区域截图的函数
  • 添加窗口区域截图示例,窗口截图遇到特权程序比如hyper-v时,会报权限错误,不适合使用unwrap,用match替代。

@nashaofu
Copy link
Copy Markdown
Owner

如果能实现其他平台的功能,这个pr可以被合入

@decipher3114
Copy link
Copy Markdown

decipher3114 commented Mar 31, 2025

@Waitfish Checkout Capter

@nashaofu This app is based on based on xcap. So, you may add it in the README, if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants