Coder Social home page Coder Social logo

screenshot's People

Contributors

burntsushi avatar casperhk avatar jamesduncombe avatar joshgordon avatar kesarion avatar pftbest avatar vova616 avatar vvarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

screenshot's Issues

Exception while taking screenshot on Ubuntu

I am getting the following exception while taking a screenshot on Ubuntu.

XGB: conn.go:47: Could not get authority info: open /var/go/.Xauthority: no such file or directory
XGB: conn.go:48: Trying connection without authority info...
XGB: conn.go:47: Could not get authority info: open /var/go/.Xauthority: no such file or directory
XGB: conn.go:48: Trying connection without authority info...
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x556a40, 0xc420014130)
	/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x1a1
image.(*RGBA).Opaque(0xc42065c000, 0x62e340)
	/usr/local/Cellar/go/1.7.4/libexec/src/image/image.go:141 +0xc3
image/png.opaque(0x62e340, 0xc42065c000, 0x62c240)
	/usr/local/Cellar/go/1.7.4/libexec/src/image/png/writer.go:60 +0x162
image/png.(*Encoder).Encode(0xc4200e6010, 0x62c5c0, 0xc420054000, 0x62e340, 0xc42065c000, 0x0, 0x0)
	/usr/local/Cellar/go/1.7.4/libexec/src/image/png/writer.go:508 +0x505
image/png.Encode(0x62c5c0, 0xc420054000, 0x62e340, 0xc42065c000, 0x0, 0x0)
	/usr/local/Cellar/go/1.7.4/libexec/src/image/png/writer.go:476 +0x6a
main.main()
	/Users/kashishm/Documents/go/src/github.com/sample/example/main.go:42 +0x155

code(from example folder)

func main() {
	img, err := screenshot.CaptureScreen()
	if err != nil {
		panic(err)
	}
	f, err := os.Create("./ss.png")
	if err != nil {
		panic(err)
	}
	err = png.Encode(f, img)
	if err != nil {
		panic(err)
	}
	f.Close()
}

Maximum number of clients reached

Receive the following:
ERROR x protocol authentication refused: Maximum number of clients reached

continuously from

img, err := screenshot.CaptureScreen()

after running for several hundred iterations.

I have a feeling this is an upstream error as your code seems to close the xgb handle that you create.

I'll try and make a minimal testcase.

I needed to use fromkeith/w32 instead of AllenDang/w32

I attempted to use this library on my Windows 8.1 laptop and, first, had to change these lines to use uint32, int32 and int32, respectively, in order to get the code to compile.

After that, using https://github.com/AllenDang/w32 caused some runtime fatal errors. I went and found a more up-to-date branch, and found that the fork https://github.com/fromkeith/w32 fixed the fatal errors I was having.

Anyway, this isn't really an issue, but I figured I'd let the author of this library know.

Windows 10 scaling issue

Screenshot (using example program) works fine with I have scaling at 100%. But if I change scaling (say 125% or 150%), screenshot doesn't capture entire screen

Error after taking a lot of screenshot

After taking a lot of screenshots on Linux, I get the following error:

x protocol authentication refused: Maximum number of clients reachedError

Am I supposed to call something after I take a screenshot.

I also get those logs whenever I take a screenshot:

XGB: conn.go:47: Could not get authority info: EOF
XGB: conn.go:48: Trying connection without authority info...

fps?

what kind of fps can I expect on a relatively decent mac?

OSX

github.com/vova616/screenshot/screenshot_darwin.go:49: cannot use rawData (type C.CFDataRef) as type C.CFTypeRef in argument to func literal

Panic in BitBlt

I have experienced a panic in BitBlt. This is hardly necessary to trigger panics in your package, when you could just return an error.

panic: BitBlt failed

goroutine 12 [running]:
myproject/vendor/github.com/vova616/screenshot.BitBlt(0xffffffff920134ee, 0x0, 0x0, 0x31c, 0x4c, 0xffffffff90011059, 0xbe4, 0x824, 0xcc0020)
myproject/vendor/github.com/vova616/screenshot/screenshot_windows.go:140 +0xed
myproject/vendor/github.com/vova616/screenshot.CaptureRect(0xbe4, 0x824, 0xf00, 0x870, 0x0, 0x0, 0x0)
myproject/sectionGuard/vendor/github.com/vova616/screenshot/screenshot_windows.go:74 +0x310
main.GetTraybarBackground(0xc04224cf50, 0xc04234b301, 0x0, 0x0)
myproject/main.go:30 +0xfe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.