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
pass x,y parameters to saveFrame() (Read 477 times)
pass x,y parameters to saveFrame()
Nov 8th, 2008, 4:16am
 
how can I use saveFrame() to save only a specified part of the window?

thanks
Re: pass x,y parameters to saveFrame()
Reply #1 - Nov 8th, 2008, 2:25pm
 
Use get() to get a portion of the display as a PImage, then call save() on the PImage that's returned.
Re: pass x,y parameters to saveFrame()
Reply #2 - Dec 7th, 2008, 6:12pm
 
Thanks, I seem to have it half working

PImage cam = get(20,40,100,100);
save("cam.jpg");

still seems to save the whole screen but if I try:
PImage cam = get(20,40,100,100);
image(cam,0,0);

it shows that get is grabbing the right spot I just don't seem to be using save correctly




Re: pass x,y parameters to saveFrame()
Reply #3 - Dec 7th, 2008, 7:26pm
 
PImage cam = get(20,40,100,100);
cam.save("cam.jpg");
Re: pass x,y parameters to saveFrame()
Reply #4 - Dec 7th, 2008, 9:49pm
 
thanks
worked perfectly
Page Index Toggle Pages: 1