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.
IndexSuggestions & BugsSoftware Bugs › saveFrame
Page Index Toggle Pages: 1
saveFrame (Read 2080 times)
saveFrame
Apr 21st, 2005, 5:34pm
 
Hi!
There's a bug with saveFrame at least with the window$ version.

Code:

void draw() {
if (random(10) < 1) {
saveFrame("test-####.tif");
println("grabbed...");
}
}


java.io.FileNotFoundException: d:\test\d:\test\test-0018.tif (Filename, directory or volume label invalid)

The problem doesn't happend if you don't specify the filename of the image like in here:

Code:

void draw() {
if (random(10) < 1) {
saveFrame();
println("grabbed...");
}
}
Re: saveFrame
Reply #1 - Apr 21st, 2005, 6:53pm
 
bummer, that i'd already caught that one. i wonder what happened.
Re: saveFrame
Reply #2 - Apr 26th, 2005, 6:03am
 
Is this related to the Mac bug where saveFrame with a folder name in the path creates a weird set of nested folders like Applications/processing-0085/projects/screengrabs/image_0000.tif?

Re: saveFrame
Reply #3 - Apr 26th, 2005, 6:09am
 
you bet.. seems to be partially fixed (like maybe save() works but not saveFrame?) but not fully. just something dumb to take care of...
Re: saveFrame
Reply #4 - Apr 29th, 2005, 11:49pm
 
I found this bug too. . . a quick solution is the following:

saveFrame("qt/seq" + ((counter < 10) ? "000" : (counter < 100) ? "00" : "0") + counter + ".tif");
counter++;

a bit of a hack, but good enough to get the job done. .

Dan
Re: saveFrame
Reply #5 - Apr 30th, 2005, 4:20am
 
if this works:

saveFrame("qt/seq" + ((counter < 10) ? "000" : (counter < 100) ? "00" : "0") + counter + ".tif");
counter++;

then this is a simpler version:

saveFrame("qt/seq" + nf(frameCount, 4) + ".tif");
Re: saveFrame
Reply #6 - Apr 30th, 2005, 6:07am
 
now fixed for rev 86.
Page Index Toggle Pages: 1