PImage

Data / Composite

Description

Datatype for storing and manipulating images. Load with loadImage() or create with createImage().

Syntax

PImage* img = loadImage("file.png") PImage* img = createImage(w, h, ARGB)

Parameters

None

Returns

PImage

Methods

pixels[]Array of color values for the image
widthWidth of the image in pixels
heightHeight of the image in pixels
loadPixels()Load pixel data into pixels[]
updatePixels()Update image from pixels[]
get(int x, int y)Get pixel color at position
set(int x, int y, color c)Set pixel color at position
resize(int w, int h)Resize the image
filter(int mode)Apply an image filter
mask(PImage m)Apply an alpha mask

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...