Name

pixels

Description List containing the values for all the pixels in the display window. These values are of the color datatype. This list 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 list. For example, the statement color b = pixels[230] will set the variable b to be equal to the value at that location in the list.

Before accessing this list, the data must loaded with the loadPixels() function. After the list data has been modified, the updatePixels() function must be run to update the changes. Without loadPixels(), running the code may (or will in future releases) result in a NullPointerException.
Syntax
	loadPixels()
	pixels[i] = var
Parameters
i int: index within the pixels array to access
Related PImage_loadPixels
updatePixels
PVector_get
set
PImage
Creative Commons License