Education/Projects/ProcessingForTheWeb/PImage: Difference between revisions
< Education | Projects | ProcessingForTheWeb
Jump to navigation
Jump to search
(→Fields) |
|||
Line 13: | Line 13: | ||
width: the width of the image<br /> | width: the width of the image<br /> | ||
height: the height of the image<br /> | height: the height of the image<br /> | ||
[[http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#imagedata| ImageData]] a canvas element that contains width, height, and a pixel array. | |||
== Methods == | == Methods == |
Revision as of 01:18, 28 November 2009
Summary
This is a class written for Education/Projects/ProcessingForTheWeb. It is a data type for storing images. Images can be displayed in 2D and 3D. Before any image can be used it must be loaded using the loadImage() function. View official Reference
Examples
PImage = loadImage("laDefense.jpg");
image(b, 0, 0);
Fields
width: the width of the image
height: the height of the image
[ImageData] a canvas element that contains width, height, and a pixel array.
Methods
Description | |
---|---|
get() | Reads the color of any pixel or grabs a rectangle of pixels |
set() | Writes a color to any pixel or writes an image into another |
copy() | Copies the entire image |
mask() | Masks part of the image from displaying |
blend() | Copies a pixel or rectangle of pixels using different blending modes |
filter() | Converts the image to grayscale or black and white |
save() | Saves the image to a TIFF, TARGA, PNG, or JPEG file |
resize() | Changes the size of an image to a new width and height |
loadPixels() | Loads the pixel data for the image into its pixels[] array |
updatePixels() | Updates the image with the data in its pixels[] array |
Bugs
Refer to the reference of each function for a specific bug report.
Bug Description | Fixed?(Date) |
---|---|