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? I want to API to return IMAGE format.
Asked
Active
Viewed 916 times
2 Answers
0
Yes, there is java.awt.Robot
.

musiKk
- 14,751
- 4
- 55
- 82
-
Thanks .It would be greate if you show some pseudocode – jslearner Mar 29 '11 at 09:01
-
i want the entire part of scrren that is marked by the 2 points to be retunred in form of image.I cant find it in given class – jslearner Mar 29 '11 at 09:03
0
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.

Andrew Thompson
- 168,117
- 40
- 217
- 433