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
Renaming saved frames. (Read 526 times)
Renaming saved frames.
Nov 14th, 2009, 6:34am
 
Hi is it possible to do something similar to using saveFrame with the '####.jpg' format, but instead of adding the frame number onto the filename, I want to have a variable in my sketch that goes up by 1 each time the key is pressed (otherwise the file-numbers become irregular and huge!).


So it would create:

image1.jpg - pressed once
image2.jpg - pressed twice
image3.jpg - pressed thrice!

instead of:

image0102.jpg - pressed once
image0456.jpg - pressed twice
image1200.jpg - pressed thrice!
Re: Renaming saved frames.
Reply #1 - Nov 14th, 2009, 2:04pm
 
thats new to me that it adds the frame number. Shouldnt it count up ?

anyway, you can just create a variable itself. call it whatever you want and count it up everytime the mouse is clicked and then use
saveFrame("screen"+i+".jpg");
Re: Renaming saved frames.
Reply #2 - Nov 15th, 2009, 9:58am
 
Yeah I had made a variable but didnt know how to go about naming it properly! Thanks.
Page Index Toggle Pages: 1