title: how to loop over the pixels using 2D array?
body: <p>For example:</p>
  
  
  
  <pre class="lang-java prettyprint-override"><code>loadPixels(); 
  for (int i = 0; i &lt; 240; i++) 
  {
    for(int j =0; i &lt; 240; j++)
    {
      color p = pixels[i][j];    // ERROR : The type of the expression must be an array 
                                    type but it resolved to int
  
  
      float cRed = 0.2989 * red(p);
      float cGreen = 0.5870 * green(p); 
      float cBlue = 0.1140 * blue(p);
      pixels[i][j] = color(cRed, cGreen, cBlue);
    }
  }
  updatePixels();
  </code></pre>