<?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: Example 15-7: Displaying the Pixels of an Image</title>
	<atom:link href="http://www.learningprocessing.com/examples/chapter-15/example-15-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learningprocessing.com</link>
	<description>A Beginner's Guide to Programming Images, Animation, and Interaction by Daniel Shiffman</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:27:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anonymous</title>
		<link>http://www.learningprocessing.com/examples/chapter-15/example-15-7/comment-page-1/#comment-20694</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 03 Jan 2012 18:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=592#comment-20694</guid>
		<description>Make sure your image is the same dimensions as your Processing window, i.e. 

size(640,480);

your image should be 640x480</description>
		<content:encoded><![CDATA[<p>Make sure your image is the same dimensions as your Processing window, i.e. </p>
<p>size(640,480);</p>
<p>your image should be 640&#215;480</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HANDIKA ERANDO</title>
		<link>http://www.learningprocessing.com/examples/chapter-15/example-15-7/comment-page-1/#comment-20685</link>
		<dc:creator>HANDIKA ERANDO</dc:creator>
		<pubDate>Thu, 22 Dec 2011 06:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=592#comment-20685</guid>
		<description>for (int y = 0; y &lt; height; y++ ) {
    for (int x = 0; x &lt; width; x++ ) {
      int loc = x + y*width;     int displayLoc = x + y*width;     int imageLoc = x + y*img.width;     pixels[displayLoc] = img.pixels[imageLoc];      
      float r = red(img.pixels [loc]); 
      float g = green(img.pixels[loc]);
      float b = blue(img.pixels[loc]);

      pixels[loc] = color(r,g,b);
    }
  }Where i must insert that code...i am already trying implements that code like above...but in row float r ... blabla error in arrayindexoutofbound exception 40000</description>
		<content:encoded><![CDATA[<p>for (int y = 0; y &lt; height; y++ ) {<br />
    for (int x = 0; x &lt; width; x++ ) {<br />
      int loc = x + y*width;     int displayLoc = x + y*width;     int imageLoc = x + y*img.width;     pixels[displayLoc] = img.pixels[imageLoc];<br />
      float r = red(img.pixels [loc]);<br />
      float g = green(img.pixels[loc]);<br />
      float b = blue(img.pixels[loc]);</p>
<p>      pixels[loc] = color(r,g,b);<br />
    }<br />
  }Where i must insert that code&#8230;i am already trying implements that code like above&#8230;but in row float r &#8230; blabla error in arrayindexoutofbound exception 40000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: random</title>
		<link>http://www.learningprocessing.com/examples/chapter-15/example-15-7/comment-page-1/#comment-20399</link>
		<dc:creator>random</dc:creator>
		<pubDate>Fri, 11 Mar 2011 20:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=592#comment-20399</guid>
		<description>Thank you very very much Daniel!!! Now is clear... ;)
P.S: thank for your quick response.</description>
		<content:encoded><![CDATA[<p>Thank you very very much Daniel!!! Now is clear&#8230; <img src='http://www.learningprocessing.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
P.S: thank for your quick response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.learningprocessing.com/examples/chapter-15/example-15-7/comment-page-1/#comment-20392</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 11 Mar 2011 02:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=592#comment-20392</guid>
		<description>Exactly, you would say:

int displayLoc = x + y*width;
int imageLoc = x + y*img.width;
pixels[displayLoc] = img.pixels[imageLoc];</description>
		<content:encoded><![CDATA[<p>Exactly, you would say:</p>
<p>int displayLoc = x + y*width;<br />
int imageLoc = x + y*img.width;<br />
pixels[displayLoc] = img.pixels[imageLoc];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: random</title>
		<link>http://www.learningprocessing.com/examples/chapter-15/example-15-7/comment-page-1/#comment-20391</link>
		<dc:creator>random</dc:creator>
		<pubDate>Fri, 11 Mar 2011 02:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=592#comment-20391</guid>
		<description>If the image source has not the same dimension of the display area... where i put &quot;int imageLoc = x + y*img.width;&quot;, and where &quot;int displayLoc = x + y*width;&quot;</description>
		<content:encoded><![CDATA[<p>If the image source has not the same dimension of the display area&#8230; where i put &#8220;int imageLoc = x + y*img.width;&#8221;, and where &#8220;int displayLoc = x + y*width;&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

