修改截图调用方式,加入可选的尺寸参数

This commit is contained in:
2025-03-22 10:19:54 +08:00
parent d8b3c87347
commit b5fcc72f63
5 changed files with 103 additions and 10 deletions

22
client/shotClient_test.go Normal file
View File

@@ -0,0 +1,22 @@
package client
import (
"testing"
)
func TestGetScreen(t *testing.T) {
/* 测试成功版本:
Windows Server 2008 ✔
Windows Server 2012 ✔
Windows Server 2016 ✔
Windows 7 ✔
Windows 10 ✔
*/
imgBytes, err := RealGetScreen("127.0.0.1:3389", 1024, 800)
if err != nil {
t.Fatal(err)
}
t.Logf("Length of imgBytes: %v", len(imgBytes))
}