Update README.md

This commit is contained in:
vcaesar 2021-10-12 10:18:15 -04:00
parent 0feac878f9
commit 185c253a82
2 changed files with 32 additions and 0 deletions

View File

@ -209,6 +209,7 @@ import (
"fmt"
"github.com/go-vgo/robotgo"
"github.com/vcaesar/gcv"
)
func main() {
@ -233,6 +234,21 @@ func main() {
robotgo.SaveBitmap(bitmap, "test.png")
}
func opencv() {
name := "test.png"
name1 := "test_001.png"
robotgo.SaveCapture(name, 10, 10, 30, 30)
robotgo.SaveCapture(name1)
fmt.Print("gcv find image: ")
fmt.Println(gcv.FindImgFile(name, name1))
bit := robotgo.OpenBitmap(name)
defer robotgo.FindBitmap(bit)
fmt.Print("find bitmap: ")
fmt.Println(robotgo.FindBitmap(bit))
}
```
#### [Event](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go)

View File

@ -207,6 +207,7 @@ import (
"fmt"
"github.com/go-vgo/robotgo"
"github.com/vcaesar/gcv"
)
func main() {
@ -231,6 +232,21 @@ func main() {
robotgo.SaveBitmap(bitmap, "test.png")
}
func opencv() {
name := "test.png"
name1 := "test_001.png"
robotgo.SaveCapture(name, 10, 10, 30, 30)
robotgo.SaveCapture(name1)
fmt.Print("gcv find image: ")
fmt.Println(gcv.FindImgFile(name, name1))
bit := robotgo.OpenBitmap(name)
defer robotgo.FindBitmap(bit)
fmt.Print("find bitmap: ")
fmt.Println(robotgo.FindBitmap(bit))
}
```
#### [事件](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go)