screenshot: Index | Files | Directories

package screenshot

import ""

Package screenshot captures screen-shot image as image.RGBA. Mac, Windows, Linux, FreeBSD, OpenBSD, NetBSD, and Solaris are supported.


Package Files

screenshot.go screenshot_linux.go

func Capture Uses

func Capture(x, y, width, height int) (*image.RGBA, error)

Capture returns screen capture of specified desktop region. x and y represent distance from the upper-left corner of main display. Y-axis is downward direction. This means coordinates system is similar to Windows OS.

func CaptureDisplay Uses

func CaptureDisplay(displayIndex int) (*image.RGBA, error)

CaptureDisplay captures whole region of displayIndex'th display.

func CaptureRect Uses

func CaptureRect(rect image.Rectangle) (*image.RGBA, error)

CaptureRect captures specified region of desktop.

func GetDisplayBounds Uses

func GetDisplayBounds(displayIndex int) image.Rectangle

GetDisplayBounds returns the bounds of displayIndex'th display. The main display is displayIndex = 0.

func NumActiveDisplays Uses

func NumActiveDisplays() int

NumActiveDisplays returns the number of active displays.



Package screenshot imports 2 packages (graph) and is imported by 6 packages. Updated 2019-07-19. Refresh now. Tools for package owners.