I need to grab a series of screenshots and concatenate them into a movie. I'm trying to use the java Robot class to capture the screen.
But the createScreenCapture() method takes more than 1 second on my machine. I can't even get 1 fps. Is there a way to speed it up? Or is there any other API?
Edit: It is allocating a buffered image.
BufferedImage image = robot.createScreenCapture(screen);
//Save the screenshot as a jpg
File file = new File("images/screen"+ index + ".jpg");
ImageIO.write(image, "jpg", file);
index++;
Writing it to the jpg file takes about 200 ms where as getting BufferedImage takes about 1400ms.