-
Go library to capture desktop screen from Kbinani/screenshot
-
Added Window Capture for Specific Application on Windows
-
sample program
main.go
package main import ( "github.com/kbinani/screenshot" "image/png" "os" "fmt" ) func main() { window := gocv.NewWindow("Capture") for { winName := "Spotify Premium" u16fname, err := syscall.UTF16FromString(winName) img, err := screenshot.CaptureApp2(&u16fname[0]) if err != nil { panic(err) } imgMat, err := gocv.ImageToMatRGBA(img) if err != nil { panic(err) } window.IMShow(imgMat) window.WaitKey(1) } }
MIT Licence
kbinani