Simple cross-platform pure Go screen shot library. (tested on linux&windows&osx)
- Changed: linux and freebsd source code is one file now
- Changed: linux (and freebsd) code refactored
- Changed: Connection to X in linux is separated from screenshoting (Now no memory leakage while screenshoting in a loop)
- Changed: use library github.com/jezek instead of github.com/BurntSushi
Import the package
import (
"github.com/Fast-IQ/screenshot"
)func main() {
screenshoter := screenshot.New()
img, err := screenshot.CaptureScreen()
if err != nil {
log.Fatal(err)
}
}- Windows - None
- Linux/FreeBSD - https://github.com/jezek/xgb
- OSX - cgo (CoreGraphics,CoreFoundation, that should not be a problem)
Look at examples/ folder.