Education/Projects/ProcessingForTheWeb/PImage: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with '== 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 imag…')
 
Line 6: Line 6:
=== Examples ===
=== Examples ===


PImage b;
PImage b; <br />
b = loadImage("laDefense.jpg");
b = loadImage("laDefense.jpg"); <br />
image(b, 0, 0);
image(b, 0, 0); <br />


=== Fields ===
=== Fields ===

Revision as of 05:19, 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