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

Bitmap save and new screen capture for Mac. #191

Closed
wants to merge 11 commits into from
Closed

Conversation

octalmage
Copy link
Owner

@octalmage octalmage commented May 15, 2016

Description

I started working on bitmap saving and realized there was an issue with the screen capture code on Mac. Due to the high DPI, images should be double the size of the screen. Instead the saved images were the same size, with double the pixels written to the file.

This change has the potential to break backwards compatibility for users using colorAt. To correct this, they can get the image size, divide it by the screen size, then multiply their colorAt coordinates by the result.

This isn't perfect yet, there's an issue when writing images to disk that are smaller than 16px, but it's a start.

Todo

  • Update colorAt tests.
  • Add tests for bitmap.save.
  • Document the screen vs image size issue.
  • Document the misaligned pixels fix.

Resolves #188

@octalmage
Copy link
Owner Author

I'm going to close this, fixing with an updated PR: #242

@octalmage octalmage closed this Oct 16, 2016
@octalmage octalmage deleted the bitmap-save branch October 16, 2016 00:02
@octalmage octalmage restored the bitmap-save branch October 16, 2016 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix screen capture on Mac.
1 participant