Education/Projects/ProcessingForTheWeb/PImage: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 12: Line 12:
=== Fields ===
=== Fields ===


width:    the width of the image
width:    the width of the image<br />
height:    the height of the image
height:    the height of the image<br />
pixels[]:  an array that holds the color of each pixel in the image
pixels[]:  an array that holds the color of each pixel in the image<br />


== Methods ==
== Methods ==

Revision as of 05:20, 22 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 b;
b = loadImage("laDefense.jpg");
image(b, 0, 0);

Fields

width: the width of the image
height: the height of the image
pixels[]: an array that holds the color of each pixel in the image

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

Bugs

Refer to the reference of each function for a specific bug report.

Bug Description Fixed?(Date)

Tests