Skip to content

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

Merged
matthiasblaesing merged 1 commit intojava-native-access:masterfrom
sommd:master
Feb 21, 2017
Merged

Improve speed of GDIUtils.getScreenshot by ~30%#772
matthiasblaesing merged 1 commit intojava-native-access:masterfrom
sommd:master

Conversation

@sommd
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

sommd commented Feb 19, 2017

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

@matthiasblaesing
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants