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 › save cropped image / part of sketch
Page Index Toggle Pages: 1
save cropped image / part of sketch (Read 213 times)
save cropped image / part of sketch
Dec 5th, 2008, 2:15am
 
I was just wanting to know if it is possible to save part of a sketch window - if my sketch is 400*600 and I just want 400*400 - is that possible?


Any help is much appreciated.

kk

Re: save cropped image / part of sketch
Reply #1 - Dec 5th, 2008, 10:06am
 
You could use get() to get a part of the screen as PImage and then save this with save() .

Code:

PImage img =get(0, 0, 400, 400);
img.save("test.jpg");
Page Index Toggle Pages: 1