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
Exporting Data??? (Read 1036 times)
Exporting Data???
Feb 3rd, 2010, 7:30pm
 
I have a script that has two loops in void draw().  as it goes through each time it exports a different jpeg image. (25)  I was wondering if there is a command that allows me to also export the data or code that made the image.  It would be beneficial to be able to retrieve the exact floats and integers that created that specific image.  thanks
Re: Exporting Data???
Reply #1 - Feb 3rd, 2010, 11:24pm
 
yes, you can save txt files and save all kind of information in it.
take a look at http://processing.org/reference/createWriter_.html

but maybe it would be enough in your case to write all the information to the name of the image. that would make it easy to read the data.
so instead of just  saveFrame("image.tif");
you could write
saveFrame(x+"-"+y"-"+size+"-"+count".tif");

this would save images named 30-40-100-0001.tif for example..
Hope that makes sense Smiley


Re: Exporting Data???
Reply #2 - Feb 4th, 2010, 7:14am
 
if Cedric's solution does not work for you, you can use the Sanselan Library for writing exif data directly into Jpegs.

http://cwiki.apache.org/SANSELAN/gettingstarted.html
Re: Exporting Data???
Reply #3 - Feb 5th, 2010, 9:20am
 
The createWriter() command doesn't work. (not even the one from the reference portion of the site.  it doesn't recognize the output token?

any suggestions???
Re: Exporting Data???
Reply #4 - Feb 5th, 2010, 9:59am
 
I got it to print a txt file. It just doesn't put anything in the file.
Re: Exporting Data???
Reply #5 - Feb 5th, 2010, 10:38am
 
thanks for all of the help.  I really apprectiate the quick response
Grin
Re: Exporting Data???
Reply #6 - Feb 5th, 2010, 12:33pm
 
Woah, cool down, people here eat, work, sleep and even, sometime, have a life!

I copied and pasted the example of createWriter in a sketch, ran it, and it works perfectly.
Page Index Toggle Pages: 1