-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screenshot is merged when multiple display screens are connected #9
Comments
can you try this one and tell me how it works?
|
Thanks for the quick reply. With the above code also, the screenshot is same. |
We have forked this repo and we were using |
Thanks for checking :). |
The CG framework does have support for multiple displays, but I didn't go so far when I implemented the darwin version (it was simpler to just get the main display). The advantage of using CG over screencapture is you don't need to write to a file and thus you have no issues with file permissions. Also, the library has better chances of outliving the tool. I can work out a multi display version when I get the time ;) |
The problem is not (probably) caused by multiple displays. Today I played with your library and received the same result. Looking deeper into the function CaptureRect() I discovered that display resolution returns screen size (e.g. 1440x900), but returned Image is 2880x1800 on my retina display. This caused corruption of the image. I was able to get correct picture tweaking your function, but 2x bigger. Because I don't know Apple Core framework I wasn't able to scale down the picture to desired resolution. |
15' Retina display has in fact 2880x1800 pixels. So the image is probably correct, and 1440x900 number is wrong. |
@pftbest: I don't use native resolution on my 13" notebook, I use 1440x900. So both numbers are correct. Screen resolution is 1440x900 (reported by |
It is working fine with one display screen but gives a merged screenshot of multiple displays on mac.
The text was updated successfully, but these errors were encountered: