All Projects → kbinani → Screenshot

kbinani / Screenshot

Licence: mit
Go library to capture desktop to image

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Screenshot

Screenshotty
A library for programatically capturing screenshots on Android
Stars: ✭ 141 (-74.13%)
Mutual labels:  screenshot, screen-capture
android-capture
Capture video and screenshots from Android devices and emulators.
Stars: ✭ 32 (-94.13%)
Mutual labels:  screenshot, screen-capture
D3dshot
Extremely fast and robust screen capture on Windows with the Desktop Duplication API
Stars: ✭ 159 (-70.83%)
Mutual labels:  screenshot, screen-capture
Chart To Aws
Microservice to generate screenshot from a webpage and upload it to a AWS S3 Bucket.
Stars: ✭ 43 (-92.11%)
Mutual labels:  screenshot, screen-capture
dot-screencap
A screencapturing library
Stars: ✭ 31 (-94.31%)
Mutual labels:  screenshot, screen-capture
Imgursniper
📷 A quick and easy Image, Screenshot and Screen recording sharing tool
Stars: ✭ 69 (-87.34%)
Mutual labels:  screenshot, screen-capture
ScreenEat
screenshot made delicious
Stars: ✭ 54 (-90.09%)
Mutual labels:  screenshot, screen-capture
Sharex
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
Stars: ✭ 18,143 (+3228.99%)
Mutual labels:  screenshot, screen-capture
autoscreen
Automated screen capture utility
Stars: ✭ 76 (-86.06%)
Mutual labels:  screenshot, screen-capture
Live-Desktop-Capture
A Live Desktop Capture using Go and WebSockets
Stars: ✭ 42 (-92.29%)
Mutual labels:  screenshot, screen-capture
Svg Screenshot
リンクもまるごとキャプチャしてSVGで出力するChromeスクリーンショット拡張機能
Stars: ✭ 31 (-94.31%)
Mutual labels:  screenshot, screen-capture
Screen capture lite
cross platform screen/window capturing library
Stars: ✭ 340 (-37.61%)
Mutual labels:  screenshot, screen-capture
Upscreen
Capture your screen, upload to your own server.
Stars: ✭ 17 (-96.88%)
Mutual labels:  screenshot, screen-capture
Swift Screencapture
A Swift framework to easily capture the screen on OS X.
Stars: ✭ 105 (-80.73%)
Mutual labels:  screenshot, screen-capture
Snapshots For Windows
Application for make and upload screenshots / Приложение для создания и загрузки скриншотов
Stars: ✭ 6 (-98.9%)
Mutual labels:  screenshot, screen-capture
go-scrap
Go library to capture screen pixels for screenshots or screen recording
Stars: ✭ 68 (-87.52%)
Mutual labels:  screenshot, screen-capture
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-53.21%)
Mutual labels:  screenshot, screen-capture
Falcon
Take Android screenshots with Falcons bright eye!
Stars: ✭ 362 (-33.58%)
Mutual labels:  screenshot, screen-capture
Ffcast
Run command on rectangular screen regions
Stars: ✭ 478 (-12.29%)
Mutual labels:  screenshot
React Screenshot Test
A dead simple library to screenshot test React components
Stars: ✭ 519 (-4.77%)
Mutual labels:  screenshot

screenshot

Build Status Go Report Card

  • Go library to capture desktop screen.
  • Support Windows, Mac, Linux, FreeBSD, OpenBSD, NetBSD, and Solaris environment.
  • Multiple display supported.
  • cgo free for Windows, Linux, FreeBSD, OpenBSD, NetBSD, and Solaris.

example

  • sample program main.go

     package main
    
     import (
     	"github.com/kbinani/screenshot"
     	"image/png"
     	"os"
     	"fmt"
     )
    
     func main() {
     	n := screenshot.NumActiveDisplays()
    
     	for i := 0; i < n; i++ {
     		bounds := screenshot.GetDisplayBounds(i)
    
     		img, err := screenshot.CaptureRect(bounds)
     		if err != nil {
     			panic(err)
     		}
     		fileName := fmt.Sprintf("%d_%dx%d.png", i, bounds.Dx(), bounds.Dy())
     		file, _ := os.Create(fileName)
     		defer file.Close()
     		png.Encode(file, img)
    
     		fmt.Printf("#%d : %v \"%s\"\n", i, bounds, fileName)
     	}
     }
    
  • output example

     $ go run main.go
     #0 : (0,0)-(1280,800) "0_1280x800.png"
     #1 : (-293,-1440)-(2267,0) "1_2560x1440.png"
     #2 : (-1373,-1812)-(-293,108) "2_1080x1920.png"
     $ ls -1
     0_1280x800.png
     1_2560x1440.png
     2_1080x1920.png
     main.go
    

coordinate

Y-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

license

MIT Licence

author

kbinani

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].