Is there is a cross-platform way to capture the screen in Google's Go? Or any way for that matter, but cross platform would be preferred.
Press the Power and Volume down buttons at the same time. If that doesn't work, press and hold the Power button for a few seconds. Then tap Screenshot.
Press and hold Ctrl + Alt together, then press PRTSC. A red-highlighted rectangular box will appear. Now, press and hold the mouse left-click. Next, drag the mouse on the scrolling window to select the area.
On your desktop or laptop, press the Print Screen button on your keyboard to take a screenshot. You may also take a screenshot using the CTRL + Print Screen shortcut. Windows takes a full-screen screenshot and saves it to the clipboard. Next, paste the image from the clipboard into an image editing tool like Paint.
Now there is:
https://github.com/vova616/screenshot
go get github.com/vova616/screenshot
Example:
package main
import "github.com/vova616/screenshot"
func main() {
img, err := screenshot.CaptureScreen() // *image.RGBA
myImg := image.Image(img) // can cast to image.Image, but not necessary
}
If you need macOS support as well (until the pull request is merged), get:
https://github.com/kesarion/screenshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With