Education/Projects/ProcessingForTheWeb/PImage.get: Difference between revisions

(Created page with '== Summary == This is a method of the PImage class written for Education/Projects/ProcessingForTheWeb. Gets the color of a pixel, a group of pixels, or the entire image. [h…')
 
Line 13: Line 13:


=== Syntax ===
=== Syntax ===
 
{| class="wikitable" border="1"
img.get():                    returns the entire image<br />
|-
img.get(x, y):                returns the color of a single pixel in the img pixels[y*width+x]<br />
!
img.get(x, y, width, height): returns a section of the display window by specifing an additional width and height parameter. If the pixel requested is outside of the image window, black is returned. <br />
! Description
|-
|img.get()
|returns the entire image
|-
|img.get(x, y)
|returns the color of a single pixel in the img pixels[y*width+x]
|-
|img.get(x, y, width, height)
|returns a section of the display window by specifing an additional width and height parameter. If the pixel requested is outside of the image window, black is returned.  
|}


== Parameters ==
== Parameters ==