FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

pixels[]

   
Examples  
color pink = color(255, 102, 204); 
loadPixels(); 
for (int i=0; i<(width*height/2)-width/2; i++) { 
  pixels[i] = pink; 
} 
updatePixels(); 
Description   Array containing the values for all the pixels in the display window. These values are of the color datatype. This array is the size of the display window. For example, if the image is 100x100 pixels, there will be 10000 values and if the window is 200x300 pixels, there will be 60000 values. The index value defines the position of a value within the array. For example, the statment color b = pixels[230] will set the variable b to be equal to the value at that location in the array. Before accessing this array, the data must loaded with the loadPixels() functions. After the array data has been modified, the updatePixels() function must be loaded to update the changes.
   
Syntax  
pixels[index]
   
Parameters  
index   int: must not exceed the size of the array

   
Usage   Web & Application
   
Related   loadPixels()
updatePixels()
get()
set()
PImage
 
 






   
 
Updated: Fri Jul 15 16:35:59 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info