The createImage() function provides a fresh buffer of pixels to play with. This example creates an image gradient.
Original Processing.org Example: CreateImage