Skip to content
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

Add support for capture of High DPI screenshots on mac os #20

Open
Ameobea opened this issue Mar 9, 2019 · 1 comment
Open

Add support for capture of High DPI screenshots on mac os #20

Ameobea opened this issue Mar 9, 2019 · 1 comment

Comments

@Ameobea
Copy link
Contributor

Ameobea commented Mar 9, 2019

Many mac os laptops have high DPI screens, like Retina. I've created a screenshot capturer using this library, but the captured screenshots are very low resolution. Here's an example:

When I check the resolution of the detected display, it reports 1440x900. However, the resolution is reported to be 2880x1800 in my system information.

I've looked for existing code that gets a high resolution version of the display, but the majority of stuff seems to be Objective-C code with poor documentation.


I'd be happy to work on this, but I don't really know where to start. If you had any ideas about how to implement this or even some documentation that I could look at, I'd love to dive in and try to set it up.

@AyWa
Copy link

AyWa commented May 16, 2021

It has been a long time but I had same problems, so I little looked at the code.

It is related with the function CGDisplayPixelsWide and CGDisplayPixelsHigh. The pixel are in fact not physical pixel but more like the target resolution

Some thread that explain a bit more https://www.reddit.com/r/mac/comments/991yj4/2018_15_mbp_is_not_2880x1800_its_3360x2100/

You can use the PR linked:

scrap = { git = "https://github.com/AyWa/scrap", branch = "fix/macos-quality" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants