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 › capture a portion of the screen
Page Index Toggle Pages: 1
capture a portion of the screen (Read 520 times)
capture a portion of the screen
Jun 5th, 2007, 1:18pm
 
It's possible to capture and output the whole screen to an image using:

Code:

save("filename.ext");


Is there a way to capture only a portion of the screen?

cheers,
Greg
Re: capture a portion of the screen
Reply #1 - Jun 5th, 2007, 6:48pm
 
Use a scratch image to capture the partial screen, then save that image, for example:

PImage temp = get(x,y,w,h);
temp.save(savePath("filename.ext"));
Re: capture a portion of the screen
Reply #2 - Jun 5th, 2007, 8:16pm
 
Nice! Works perfect. Thanks.

cheers,
Greg
Page Index Toggle Pages: 1