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

Improve speed of GDIUtils.getScreenshot by ~30% #772

Merged
merged 1 commit into from
Feb 21, 2017
Merged

Conversation

sommd
Copy link
Contributor

@sommd sommd commented Feb 17, 2017

Instead of using setRGB on a newly created BufferedImage, create a from the pixel buffer and create the BufferedImage from that.

This is the same way that java.awt.Robot does it.

@matthiasblaesing
Copy link
Member

This looks good - I get similar measurements. Could you please add this as a feature to CHANGES.md? After that please squash the to commits and I'll merge that change to master. Thank you.

@sommd
Copy link
Contributor Author

sommd commented Feb 19, 2017

Updated CHANGES.md, not at PC so I can't squash yet. Will do it tomorrow.

@matthiasblaesing
Copy link
Member

When you have a look at it, please check the structure of the other CHANGE.md entries and follow that style.

@sommd
Copy link
Contributor Author

sommd commented Feb 19, 2017

Fixed. Sorry, I thought the # were only issues, not PRs aswell.

@matthiasblaesing
Copy link
Member

One final request: Could you please also add your username (see the other entries for the scheme).

Instead of using setRGB on a newly created BufferedImage, create a
raster from the pixel buffer and create the BufferedImage from that.

This is the same way that java.awt.Robot does it.
@matthiasblaesing matthiasblaesing merged commit 4f869f4 into java-native-access:master Feb 21, 2017
@matthiasblaesing
Copy link
Member

Merged - thank you!

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 this pull request may close these issues.

None yet

2 participants