i am currently using the java timer to schedule my program to print screen
timer.scheduleAtFixedRate(new PrintScreen(),0,1);
this is my code, it schedule to do PrintScreen with 0s delay and 0.001s/image
can it work more faster due to the result image still have some lagging during the printscreen.
i am currently using the java printscreen at every 0.001 s. i have attached the image as 1.jpeg and 2.jpeg
but i hope the image output will somehow similiar to image3.jpg, image4.jpg and image5.jpg
which can see the tiny movement
1.jpg : http://www.java.net/sites/default/files/1.jpeg
2.jpg : http://www.java.net/sites/default/files/2.jpeg
image3.jpg : http://www.java.net/sites/default/files/image3.jpg
image4.jpg : http://www.java.net/sites/default/files/image4.jpg
image5.jpg : http://www.java.net/sites/default/files/image5.jpg
any suggestion for this ? thanks in advance for the reply .
==================================================================================update
this is my whole code for print screen
Toolkit tool = Toolkit.getDefaultToolkit();
Dimension d = tool.getScreenSize();
Rectangle rect = new Rectangle(d);
Robot robot = new Robot();
ss.setScreenCount();
int index = ss.getScreenCount();
String screenFileName = "screenshot_" + index + ".jpeg";
File f = new File(screenFileName);
BufferedImage img = robot.createScreenCapture(rect);
ImageIO.write(img,"jpeg",f);
int totalClient = ss.getTotalClient();
for(int i=0;i<totalClient;i++)
{
RshScp rsThread = new RshScp(screenFileName,i,ss);
Thread rs = new Thread(rsThread,"RshScpThread");
rs.start();
}
Taking 1000 screenshots in a second seems difficult to do, and rather strange considering most displays update at nowhere near that rate. It looks like you’re trying to capture video. Video tends to run between 24 and 60 frames per second. 1000 frames per second is a little absurd.