<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Processing: Saving Sequential Images</title>
	<atom:link href="http://anthonymattox.com/processing-saving-sequential-images/feed" rel="self" type="application/rss+xml" />
	<link>http://anthonymattox.com/processing-saving-sequential-images</link>
	<description>Interaction Design and Digital Art</description>
	<lastBuildDate>Thu, 01 Sep 2011 10:01:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Bernhard H.</title>
		<link>http://anthonymattox.com/processing-saving-sequential-images/comment-page-1#comment-2900</link>
		<dc:creator>Bernhard H.</dc:creator>
		<pubDate>Wed, 02 Sep 2009 23:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonymattox.com/?p=1726#comment-2900</guid>
		<description>I&#039;m saving the run number in a file:

&lt;div class=&quot;code processing&quot;&gt;
&lt;pre&gt;&lt;span Class=&quot;KEY&quot;&gt;int&lt;/span&gt; runNo;
&lt;span Class=&quot;KEY&quot;&gt;void&lt;/span&gt; loadRunNo() {
  &lt;span Class=&quot;KEY&quot;&gt;byte&lt;/span&gt; loadedRunNo[] = &lt;span Class=&quot;KEY&quot;&gt;loadBytes&lt;/span&gt;(”runNo.dat”);
  runNo=(loadedRunNo[0] &lt;&lt; 24)
    + ((loadedRunNo[1] &amp; 0xFF) &lt;&lt; 16)
    + ((loadedRunNo[2] &amp; 0xFF) &lt;&gt;&gt; 24),
  (&lt;span Class=&quot;KEY&quot;&gt;byte&lt;/span&gt;)(runNo &gt;&gt;&gt; 16),
  (&lt;span Class=&quot;KEY&quot;&gt;byte&lt;/span&gt;)(runNo &gt;&gt;&gt; 8),
  (&lt;span Class=&quot;KEY&quot;&gt;byte&lt;/span&gt;)runNo};
  &lt;span Class=&quot;KEY&quot;&gt;saveBytes&lt;/span&gt;(”runNo.dat”, toSaveRunNo);
  &lt;span Class=&quot;KEY&quot;&gt;println&lt;/span&gt;(”run #”+runNo);
}

DecimalFormat df5E = &lt;span Class=&quot;KEY&quot;&gt;new&lt;/span&gt; DecimalFormat(”00000?);
&lt;span Class=&quot;KEY&quot;&gt;void&lt;/span&gt; &lt;span Class=&quot;KEY&quot;&gt;keyPressed&lt;/span&gt;() {
  &lt;span Class=&quot;KEY&quot;&gt;if&lt;/span&gt;(&lt;span Class=&quot;KEY&quot;&gt;key&lt;/span&gt; == ’s’ ){
    &lt;span Class=&quot;KEY&quot;&gt;saveFrame&lt;/span&gt;(”shots/sketchname-run-”+df5E.format(runNo)+”-shot-######.png”);
  }
}&lt;/pre&gt;
&lt;/div&gt;

and in setup():
loadRunNo();</description>
		<content:encoded><![CDATA[<p>I&#8217;m saving the run number in a file:</p>
<div class="code processing">
<pre><span Class="KEY">int</span> runNo;
<span Class="KEY">void</span> loadRunNo() {
  <span Class="KEY">byte</span> loadedRunNo[] = <span Class="KEY">loadBytes</span>(”runNo.dat”);
  runNo=(loadedRunNo[0] &lt;&lt; 24)
    + ((loadedRunNo[1] &#038; 0xFF) &lt;&lt; 16)
    + ((loadedRunNo[2] &#038; 0xFF) &lt;&gt;&gt; 24),
  (<span Class="KEY">byte</span>)(runNo &gt;&gt;&gt; 16),
  (<span Class="KEY">byte</span>)(runNo &gt;&gt;&gt; 8),
  (<span Class="KEY">byte</span>)runNo};
  <span Class="KEY">saveBytes</span>(”runNo.dat”, toSaveRunNo);
  <span Class="KEY">println</span>(”run #”+runNo);
}

DecimalFormat df5E = <span Class="KEY">new</span> DecimalFormat(”00000?);
<span Class="KEY">void</span> <span Class="KEY">keyPressed</span>() {
  <span Class="KEY">if</span>(<span Class="KEY">key</span> == ’s’ ){
    <span Class="KEY">saveFrame</span>(”shots/sketchname-run-”+df5E.format(runNo)+”-shot-######.png”);
  }
}</pre>
</div>
<p>and in setup():<br />
loadRunNo();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juego</title>
		<link>http://anthonymattox.com/processing-saving-sequential-images/comment-page-1#comment-2805</link>
		<dc:creator>Juego</dc:creator>
		<pubDate>Wed, 26 Aug 2009 10:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonymattox.com/?p=1726#comment-2805</guid>
		<description>Oops. (forgot the file extension). 

saveFrame(”&quot;name_of_sketch-”+year()+month()+day()+hour()+minute()+second()+&quot;.png&quot;);</description>
		<content:encoded><![CDATA[<p>Oops. (forgot the file extension). </p>
<p>saveFrame(”&#8221;name_of_sketch-”+year()+month()+day()+hour()+minute()+second()+&#8221;.png&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juego</title>
		<link>http://anthonymattox.com/processing-saving-sequential-images/comment-page-1#comment-2804</link>
		<dc:creator>Juego</dc:creator>
		<pubDate>Wed, 26 Aug 2009 09:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonymattox.com/?p=1726#comment-2804</guid>
		<description>I also use a timestamp but with Processing code only (as SimpleDateFormat  is more Java. Thanks for the tip.). So for those not yet comfortable with Java:

saveFrame(&quot;&quot;name_of_sketch-&quot;+year()+month()+day()+hour()+minute()+second());</description>
		<content:encoded><![CDATA[<p>I also use a timestamp but with Processing code only (as SimpleDateFormat  is more Java. Thanks for the tip.). So for those not yet comfortable with Java:</p>
<p>saveFrame(&#8220;&#8221;name_of_sketch-&#8221;+year()+month()+day()+hour()+minute()+second());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://anthonymattox.com/processing-saving-sequential-images/comment-page-1#comment-2790</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Tue, 25 Aug 2009 12:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonymattox.com/?p=1726#comment-2790</guid>
		<description>Hey, that&#039;s a great idea.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hey, that&#8217;s a great idea.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Köberle</title>
		<link>http://anthonymattox.com/processing-saving-sequential-images/comment-page-1#comment-2786</link>
		<dc:creator>Andreas Köberle</dc:creator>
		<pubDate>Tue, 25 Aug 2009 10:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonymattox.com/?p=1726#comment-2786</guid>
		<description>I use the timestamp to get unique filenames:

Date dt = new Date();
SimpleDateFormat df = new SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss.S&quot;);
saveFrame(&quot;name_of_sketch-&quot;+df.format(dt)+&quot;.png&quot;);</description>
		<content:encoded><![CDATA[<p>I use the timestamp to get unique filenames:</p>
<p>Date dt = new Date();<br />
SimpleDateFormat df = new SimpleDateFormat(&#8220;yyyy-MM-dd HH:mm:ss.S&#8221;);<br />
saveFrame(&#8220;name_of_sketch-&#8221;+df.format(dt)+&#8221;.png&#8221;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

