Simple cross-platform pure Go screen shot library. (tested on linux&windows&osx)
go get github.com/wilix-team/screenshot
Import the package
import (
"github.com/wilix-team/screenshot"
)
func main() {
img, err := screenshot.CaptureScreen()
myImg := image.Image(img)
}
- Windows - None
- Linux/FreeBSD - https://github.com/BurntSushi/xgb
- OSX - cgo (CoreGraphics,CoreFoundation, that should not be a problem)
Look at example/
folder.