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
1 change: 0 additions & 1 deletion BasicImages/BasicImages.pde

This file was deleted.

28 changes: 28 additions & 0 deletions BasicImages/data/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PImage chocolate;//declare variable for images
float scaleFactor;//variable for size of image
float x;

void setup(){
size(602,209);
chocolate= loadImage("hershey.jpg");//to load image
scaleFactor= 1;//to change the dimensions of image
imageMode(CENTER);
}

void draw(){
background(0);// background set to 0 so flag will not be dragged into multiple images of itself, no trail of flags
//tint(120,200);
image(chocolate, width/2, height/2, chocolate.width*scaleFactor, chocolate.height*scaleFactor);// dimensions of picture, resized, and will follow mouse
filter(INVERT);//inverted image
}
void keyPressed(){
if (keyCode==ESC){
exit();
}
if(keyCode==UP){//each time the key UP is pressed, then the picture gets bigger
scaleFactor+=.1;
}
if(keyCode==DOWN){//everytime the key DOWN is pressed, the picture gets smaller
scaleFactor-=.1;
}
}
Binary file added BasicImages/data/gray2.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 BasicImages/data/hershey.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 BasicImages/data/pelarge.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions BlendingImages/BlendingImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
PImage mainImage;//declare the picture variable
PImage mask;
float scaleFactor;// scale the picture

void setup(){//runs settings once
size(600,600);
mainImage=loadImage("gray2.jpg");// initialize variable picture
mask=loadImage("benderface.jpg");
scaleFactor=1;
imageMode(CENTER);// how the image will appear on the screen
mainImage.blend(mask, 0,0,600,600,0,0,600,600,SUBTRACT);//initialize the blending in the picture


}

void draw(){// runs settings in a loop
background(0);
image(mainImage, width/2, height/2);// redraw the image




}

void keyPressed(){
if(keyCode==ESC){
exit();

}
}
Binary file added BlendingImages/data/benderface.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 BlendingImages/data/gray2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
PImage mainImage;//declare the picture variable
PImage mask;
PImage point;
float scaleFactor;// scale the picture
float c=1;

void setup(){//runs settings once
size(300,279);
mainImage=loadImage("stars.jpg");// initialize variable picture
mask=loadImage("Bazinga.jpg");
point=loadImage("logo.jpg");
scaleFactor=.1;
imageMode(CENTER);// how the image will appear on the screen
mainImage.blend(mask, 0,0,300,279,0,0,300,279,ADD);//initialize the blending in the picture
noStroke();


}

void draw(){// runs settings in a loop
image(mainImage, width/2, height/2);// redraw the image
filter(GRAY);
if(mousePressed){
image(point,mouseX,mouseY,point.width*scaleFactor, point.height*scaleFactor);
}

}
void keyPressed(){
if(keyCode==ESC){
exit();

}

}


Binary file added IndependentImagePractice/data/Bazinga.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/logo.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/stars.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions MaskingImages/MaskingImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
PImage mainImage;//declare the picture variable
PImage mask;
float scaleFactor;// scale the picture

void setup(){//runs settings once
size(600,600);
mainImage=loadImage("gray2.jpg");// initialize variable picture
mask=loadImage("benderface.jpg");
scaleFactor=1;
imageMode(CENTER);// how the image will appear on the screen
mainImage.mask(mask);

}

void draw(){// runs settings in a loop
background(0);
image(mainImage, width/2, height/2);// where the image will be positioned


}

void keyPressed(){
if(keyCode==ESC){
exit();

}
}
Binary file added MaskingImages/data/Bender.png
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/benderface.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/gray.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/gray2.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/gray.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.