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.
IndexProgramming Questions & HelpSyntax Questions › createScreenCapture with Java Robot
Page Index Toggle Pages: 1
createScreenCapture with Java Robot (Read 889 times)
createScreenCapture with Java Robot
May 10th, 2008, 12:32pm
 
If you want to capture screen pixels outside the applet, whole screenshots, pixel colors, mouse movement, automatic typing
I just found this:

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Robot.html

Quote:


PImage screenshot;

void setup() {
 size(400,300);
}

void draw() {
     try {
       Robot robot = new Robot();
       screenshot = new PImage(robot.createScreenCapture(new Rectangle(0,0,screen.width,screen.height)));
     
     } catch (AWTException e) {
     }
 image(screenshot, 0, 0, width, height);
}  


works nice on may macbook, like a camera feedback
Re: createScreenCapture with Java Robot
Reply #1 - May 10th, 2008, 2:38pm
 
wao, very simple! good job!
http://blogs.yahoo.co.jp/classiclll_jp/53386808.html
tiger on macmini
Page Index Toggle Pages: 1