1 Star 0 Fork 0

橙子/screenshot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
screenshot.go 559 Bytes
一键复制 编辑 原始数据 按行查看 历史
kbinani 提交于 2016-10-02 14:34 . Support Solaris
// Package screenshot captures screen-shot image as image.RGBA.
// Mac, Windows, Linux, FreeBSD, OpenBSD, NetBSD, and Solaris are supported.
package screenshot
import (
"image"
)
// CaptureDisplay captures whole region of displayIndex'th display.
func CaptureDisplay(displayIndex int) (*image.RGBA, error) {
rect := GetDisplayBounds(displayIndex)
return CaptureRect(rect)
}
// CaptureRect captures specified region of desktop.
func CaptureRect(rect image.Rectangle) (*image.RGBA, error) {
return Capture(rect.Min.X, rect.Min.Y, rect.Dx(), rect.Dy())
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuchengzhi/screenshot.git
[email protected]:xuchengzhi/screenshot.git
xuchengzhi
screenshot
screenshot
master

搜索帮助