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

From MozillaWiki
Jump to navigation Jump to search
(Created page with '== Summary == This is a method of the PImage class written for Education/Projects/ProcessingForTheWeb. Changes the color of any pixel[http://processing.org/reference/PImage…')
 
Line 81: Line 81:
|-
|-
| set()  
| set()  
| [http://matrix.senecac.on.ca/~asobiepa/Processing/PImage/PImageSet.html get()]
| [http://matrix.senecac.on.ca/~asobiepa/Processing/PImage/PImageSet.html set()]
|}
|}

Revision as of 02:16, 28 November 2009

Summary

This is a method of the PImage class written for Education/Projects/ProcessingForTheWeb. Changes the color of any pixelView official Reference

Examples


void setup() 
{      
      size(250,200);
      background(0);
}
PImage pimg = new PImage(loadImage("fish.jpg"));
color c = pimg.get(64, 0); 
var x =0;
void draw() 
{ 
     pimg.set(x,0,c);
     image(pimg,0,0);
     x++;
}



PImageSet.jpg

Syntax

Description
img.set(x, y, color) sets the color of the pixel at x,y

Parameters

Description
img PImage
x x-coordinate of the pixel
y y-coordinate of the pixel
color color: any value of the color datatype

Returns

nothing

Bugs

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

Bug Description Fixed?(Date)

Tests

Test Location
set() set()