Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions BasicImages/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
PImage tacos;
float scaleFactor = .05;
int sz = 5;


void setup () {
size(800, 600);
tacos = loadImage("tacos.jpg"); //image (exact name)
noCursor(); //cursor no show
noStroke();
}

void draw () {
//repeat 50 time w for loop
for (i=0; i <50; i++) {
int x = int(random(width));
int y = int(random(height));
fill(tacos.get(mouseX, mouseY));
ellipse(mouseX, mouseY, 20, 20);
}
background(0);
tint (0, 115, 0); //tint
image(tacos, mouseX, mouseY, tacos.width*scaleFactor, tacos.height*scaleFactor); //image parameters (name,Xpos,Ypos,width,height)
}

void keyPressed () {
if (keyCode == UP) { //pic grows w up
scaleFactor += .1;
}
if (keyCode == DOWN) { //pic shrinks w down
scaleFactor -= .1;
}
}
Binary file added BasicImages/data/tacos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions FilteringImages/FilteringImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
PImage tacos;
float scaleFactor = .23;

void setup() {
size(800, 600);
tacos = loadImage("01_Tacos_al_Pastor.jpg");
}

void draw() {
image(tacos, 0, 0, tacos.width*scaleFactor, tacos.height*scaleFactor);
filter(BLUR, 2);
filter(ERODE);
filter(GRAY);

}
Binary file added FilteringImages/data/01_Tacos_al_Pastor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
PImage fire2;
PImage hotline;
PImage drake;
PVector loc = new PVector (width/2, height/2), vel = PVector.random2D();

void setup() {
size(800, 600);
fire2= loadImage("fire2.jpg");
hotline = loadImage("hotline.jpg");
hotline.mask(fire2);
drake = loadImage("drake.jpg");
}

void draw() {
background(map(mouseY, 0, height, 0, 255));
image(fire2, 0, 0);
filter(BLUR, 10);
image(hotline, 0, 0);
image(drake, loc.x, loc.y);
loc.add(vel);
if (loc.x>width) {
loc.x=0;
} else if (loc.x<0) {
loc.x =width;
}
if (loc.y>height) {
loc.y = 0;
} else if (loc.y <0) {
loc.y = height;
}
}
Binary file added IndependentImagePractice/data/drake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/fire.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/fire2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/hotline.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions MaskingImages/MaskingImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
PImage tacos;
PImage superman;

void setup() {
size(800,600);
tacos = loadImage("tacos2.jpg");
superman = loadImage("superman.jpg");
superman.mask(tacos);
}

void draw() {
background(map(mouseY,0,height,0,255));

image(tacos, 0, 0);
image(superman, 0,0);

}
Binary file added MaskingImages/data/superman.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/data/tacos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/data/tacos2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.