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
Bad multiple screen grab #14
Comments
Woops, weird. Few questions to try to understand, following examples:
|
So following the examples:
|
If you set the little screen as primary one, same results? How is connected the second screen (nothing special on the set-up part, or something helpful?) ? |
It's connected via HDMI and thunderbolt adapter. I'm checking the primary screen right now. |
After switching primary setting between the screens the small one (I own 11 inch MacBook Air with 10.12.1 Sierra) always gives a bad picture while the big one is ok (with bigger resolution). |
OK, you are using a Thunderbolt adaptater, good to know. I will have testing hardware in january, but for now I cannot try something for you :/ |
Thanks, will be waiting for an update. 👍 The funny thing is that the MacBook air screen has got a problem, not the attached monitor. I would expect otherwise. :) |
Hello, Finally, I could get a machine and a Thunderbolt adaptater. But all screenshots are good :/ |
Got hit by the same issue running on MacBook Air 11" - a machine with fairly uncommon native resolution (1366x768) Resulting PNG is at correct resolution, however at closer inspection it looks like there's 10 black pixels inserted at the end of each scanline - clearly that's since 1366 is not divisible by 16 (and 1376 is). I know close to nothing about CoreGraphics internals, so I am really unable to debug it further - any clues would be appreciated! |
Hello, That is a good clue, thanks. I will investigate soon. |
I've encountered a similar issue. Most likely related. Using a MacBook Air 13" with a resolution of 1440x900 and no 2nd screen.
So after some more experimentation it looks like some sort of rounding issue.
Edit: Looks like the problem always occurs when the width is not a multiple of 16 Kudos though, it's still a pretty awesome package |
@Archarachne, @vvarp and @DavideBecker: Could you try the PIL example? It will help locate the issue. |
Works fine for me, but if I change However, it looks like if the width is a multiple of 16 (e.g. |
OK, I added an example to capture a part of the screen. It works well on GNU/Linux, whatever the |
Can you print the detected dimensions to check they are not changed by the OS:
|
That gives me the expected |
Hm, it is a good thing. I will be able to try on a Mac soon. I have in mind an mistake with the bits per pixel value, but I cannot say anything right now. |
I have time to work on it now. Could you save the content of |
We've been tinkering a bit and I think we're pretty close to a good solution. I'll polish up the code and submit a pull request. |
…ot divisible by 16 (fixes #14) * Fixed image size issue and added PEP8 compliancy - Images used the rounded up width, which resulted in them being slightly wider. Whoops - Removed parameters for crop_width and used the self equivalent to be PEP8 compliant
The fix has been pushed to the dev branch. I will wait for your responses before merging to master and uploading to PyPi. Thanks @DavideBecker for the fix :) |
I'm working on 10.12.1 MacOS Sierra with 2.0.18 mss version and python 3.5. When today I tried to create multiple screenshots using mss according to documentation.
And with two different screens with resolutions
{'height': 1200, 'left': 0, 'top': 0, 'width': 1920}, {'height': 768, 'left': -1366, 'top': 0, 'width': 1366}. The bigger screenshot looks fine but the smaller gives a very bad result: http://imgur.com/a/hKrHw. What is the cause of it?
The text was updated successfully, but these errors were encountered: