# HG changeset patch # User Nobuyasu Oshiro # Date 1319453478 -32400 # Node ID 1d16dcf966e134a8fc88fa33803fee2186d4470c # Parent 3c055da4d0504fb2e4e7234a15b37dbd87b50e3f# Parent 107b965effc1107a7d6626033257b415dcd8e91e merge 166 diff -r 3c055da4d050 -r 1d16dcf966e1 .classpath --- a/.classpath Mon Oct 24 19:50:30 2011 +0900 +++ b/.classpath Mon Oct 24 19:51:18 2011 +0900 @@ -3,11 +3,5 @@ - - - - - - diff -r 3c055da4d050 -r 1d16dcf966e1 src/myVncProxy/MyRfbProto.java diff -r 3c055da4d050 -r 1d16dcf966e1 src/test/screen2image.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/screen2image.java Mon Oct 24 19:51:18 2011 +0900 @@ -0,0 +1,23 @@ +package test; + +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.image.BufferedImage; +import java.io.File; + +import javax.imageio.ImageIO; + +public class screen2image +{ + public static void main(String[] args) throws Exception + { + Robot robot = new Robot(); + BufferedImage screenShot = null; + for(int i = 0; i<10;i++) { + screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())); + System.err.println("done"); + } + ImageIO.write(screenShot, "JPG", new File("screenShot.jpg")); + } +} \ No newline at end of file