We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Desktop Stream (Read 1002 times)
Desktop Stream
May 24th, 2010, 5:21am
 
Hi
I'm working on an Remote Controle Program.
But I have the Problem that I cant make a Desktop Stream and with the Search function I havent found anything. Undecided
I have made this little code with takes the Desktop as a buffered Image but PImage doesen't use that format and when I load it every frame ther comes an error message out of memory.

public BufferedImage photo () throws Exception{
   Robot robot = new Robot();
   BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
   ImageIO.write(screenShot, "JPG", new File("screenShot.jpg"));
   System.out.println(screenShot);
   return(screenShot);
 }

I would be very very happy if someone have a solution.
Page Index Toggle Pages: 1