mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
Update capture go function
This commit is contained in:
parent
ec4d4dd0d8
commit
112fc4c6bb
@ -23,8 +23,8 @@ func bitmap() {
|
|||||||
gbit := robotgo.ToBitmap(abitMap)
|
gbit := robotgo.ToBitmap(abitMap)
|
||||||
fmt.Println("bitmap...", gbit.Width)
|
fmt.Println("bitmap...", gbit.Width)
|
||||||
|
|
||||||
gbitMap := robotgo.GoCaptureScreen()
|
gbitMap := robotgo.CaptureGo()
|
||||||
fmt.Println("GoCaptureScreen...", gbitMap.Width)
|
fmt.Println("Go CaptureScreen...", gbitMap.Width)
|
||||||
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
||||||
|
|
||||||
// robotgo.SaveCapture("saveCapture.png", 10, 20, 100, 100)
|
// robotgo.SaveCapture("saveCapture.png", 10, 20, 100, 100)
|
||||||
|
@ -326,8 +326,8 @@ func CaptureScreen(args ...int) CBitmap {
|
|||||||
return CBitmap(bit)
|
return CBitmap(bit)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GoCaptureScreen capture the screen and return bitmap(go struct)
|
// CaptureGo capture the screen and return bitmap(go struct)
|
||||||
func GoCaptureScreen(args ...int) Bitmap {
|
func CaptureGo(args ...int) Bitmap {
|
||||||
bit := CaptureScreen(args...)
|
bit := CaptureScreen(args...)
|
||||||
defer FreeBitmap(bit)
|
defer FreeBitmap(bit)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user