{"id":13623387,"url":"https://github.com/kbinani/screenshot","last_synced_at":"2025-04-29T18:53:32.400Z","repository":{"id":45827841,"uuid":"69247037","full_name":"kbinani/screenshot","owner":"kbinani","description":"Go library to capture desktop to image","archived":false,"fork":false,"pushed_at":"2025-01-18T07:41:09.000Z","size":104,"stargazers_count":1379,"open_issues_count":4,"forks_count":191,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-19T07:57:12.008Z","etag":null,"topics":["golang","screen-capture","screenshot"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbinani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-26T12:19:40.000Z","updated_at":"2025-04-18T08:33:34.000Z","dependencies_parsed_at":"2024-08-19T18:12:44.090Z","dependency_job_id":"b7eaba7a-ff30-4133-83e3-9a4dc0541e75","html_url":"https://github.com/kbinani/screenshot","commit_stats":{"total_commits":72,"total_committers":11,"mean_commits":6.545454545454546,"dds":"0.29166666666666663","last_synced_commit":"b87d318142370b67008aea5f85261fe14cf8423d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbinani%2Fscreenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbinani%2Fscreenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbinani%2Fscreenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbinani%2Fscreenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbinani","download_url":"https://codeload.github.com/kbinani/screenshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251565692,"owners_count":21609977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","screen-capture","screenshot"],"created_at":"2024-08-01T21:01:31.191Z","updated_at":"2025-04-29T18:53:32.356Z","avatar_url":"https://github.com/kbinani.png","language":"Go","funding_links":[],"categories":["golang","Go"],"sub_categories":[],"readme":"screenshot\n==========\n\n![](https://github.com/kbinani/screenshot/actions/workflows/build.yml/badge.svg)\n[![](https://img.shields.io/badge/godoc-reference-5272B4.svg)](https://godoc.org/github.com/kbinani/screenshot)\n[![](https://img.shields.io/badge/license-MIT-428F7E.svg?style=flat)](https://github.com/kbinani/screenshot/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kbinani/screenshot)](https://goreportcard.com/report/github.com/kbinani/screenshot)\n\n* Go library to capture desktop screen.\n* Multiple display supported.\n* Supported GOOS: windows, darwin, linux, freebsd, openbsd, and netbsd.\n* `cgo` free except for GOOS=darwin.\n\nexample\n=======\n\n* sample program `main.go`\n\n\t```go\n\tpackage main\n\n\timport (\n\t\t\"github.com/kbinani/screenshot\"\n\t\t\"image/png\"\n\t\t\"os\"\n\t\t\"fmt\"\n\t)\n\n\tfunc main() {\n\t\tn := screenshot.NumActiveDisplays()\n\n\t\tfor i := 0; i \u003c n; i++ {\n\t\t\tbounds := screenshot.GetDisplayBounds(i)\n\n\t\t\timg, err := screenshot.CaptureRect(bounds)\n\t\t\tif err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t\tfileName := fmt.Sprintf(\"%d_%dx%d.png\", i, bounds.Dx(), bounds.Dy())\n\t\t\tfile, _ := os.Create(fileName)\n\t\t\tdefer file.Close()\n\t\t\tpng.Encode(file, img)\n\n\t\t\tfmt.Printf(\"#%d : %v \\\"%s\\\"\\n\", i, bounds, fileName)\n\t\t}\n\t}\n\t```\n\n* output example\n\t\n\t```bash\n\t$ go run main.go\n\t#0 : (0,0)-(1280,800) \"0_1280x800.png\"\n\t#1 : (-293,-1440)-(2267,0) \"1_2560x1440.png\"\n\t#2 : (-1373,-1812)-(-293,108) \"2_1080x1920.png\"\n\t$ ls -1\n\t0_1280x800.png\n\t1_2560x1440.png\n\t2_1080x1920.png\n\tmain.go\n\t```\n\ncoordinate\n=================\nY-axis is downward direction in this library. The origin of coordinate is upper-left corner of main display. This means coordinate system is similar to Windows OS\n\nlicense\n=======\n\nMIT Licence\n\nauthor\n======\n\nkbinani\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbinani%2Fscreenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbinani%2Fscreenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbinani%2Fscreenshot/lists"}