Merge pull request #374 from go-vgo/bitmap-pr

Update README.md
This commit is contained in:
Evans 2021-10-12 10:19:42 -04:00 committed by GitHub
commit a250653ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)