开发者

Java: API for Screen Capturing [duplicate]

This question already has answers here: Is there a way to take a screenshot using Java and save it to some sort of image? (8 answers) Closed 4 years ago.

Is there any API in java that takes to inputs as 2 coordinates and takes a snap sho开发者_StackOverflow中文版t of screen marked by that co-ordinates? I want to API to return IMAGE format.


Yes, there is java.awt.Robot.


Is there any API in java that takes to inputs as 2 coordinates and takes a snap shot of screen marked by that co-ordinates? ..

Use Robot.createScreenCapture(Rectangle).

..I want to API to return IMAGE format.

What is IMAGE format? ImageIO.write(RenderedImage, String, File) will write in GIF, JPEG & PNG formats. Further formats are offered by JAI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜