Education/Projects/ProcessingForTheWeb/PImage.set
From MozillaWiki
< Education | Projects | ProcessingForTheWeb
Summary
This is a method of the PImage class written for Education/Projects/ProcessingForTheWeb. Changes the color of any pixel. View 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++; }
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() |