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
21 changes: 20 additions & 1 deletion BasicImages/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@

float canvas;
PImage screen0;
PImage screen1;
float scaleFactor;
void setup() {
size(1000, 600);
canvas = 1;
screen1 = loadImage("new-york-jets.png");
screen0 = loadImage("GRD2014_wide_logo-1920x1200.jpg");
image(screen0, 0, 0, 1000, 600);
}
void draw() {
scaleFactor = random(0.1, 0.9);
if (mousePressed == true) {
canvas = 2;
}
if (canvas == 2) {
image(screen1, random(width), random(height), 1000*scaleFactor, 600*scaleFactor);
}
}
11 changes: 11 additions & 0 deletions FilteringImages/FilteringImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
PImage screen0;
float scaleFactor;

void setup() {
size(1000, 600);
screen0 = loadImage("GRD2014_wide_logo-1920x1200.jpg");
image(screen0, 0, 0, 1000, 600);
}
void draw() {
scaleFactor = random(0.1, 0.9);
filter(BLUR);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
PImage main; //initalize allvariables needed for code
PImage mask;
PImage pic;
PImage pic1;
PImage pic2;
PImage pic3;
float canvas;

void setup() {
canvas = 1;
size(900, 750); //size of canvas
main = loadImage("Galaxy.jpg"); //load each image as a variable
mask = loadImage("GRD2014_wide_logo-1920x1200.jpg");
pic = loadImage("6819282-jets-wallpaper.jpg");
pic1 = loadImage("B5EovID.jpg");
pic2 =loadImage("boston-celtics-logo-wallpaper-1024x768.jpg");
pic3 =loadImage("New-York-Jets-2014-Football-Logo-Wallpaper.jpg");
main.mask(mask);
}

void draw() {
text("Use Keyboard to Move Through Slide Show", 100, 700); //draw text on screen
textSize(32); //change text size
fill(255); //change fill to white
if (canvas == 1) {//if canvas equals 1 change the picture
image(main, 0, 0);
filter(DILATE);
}
if (canvas == 2) {//if canvas equals 2 change the picture
image(pic1, 0, 0, 900, 750);
filter(INVERT);
}
if (canvas == 3) {//if canvas equals 3 change the picture
image(pic2, 0, 0, 900, 750);
filter(BLUR,3);
}
if (canvas == 4) { //if canvas equals 4 change the picture
image(pic3, 0, 0, 900, 750);
filter(GRAY);
}
}
void keyPressed() {//if keypressed increase the value of the canvas and change picture
if (keyPressed == true) {
if (keyCode == RIGHT) {
canvas++;
}
}
if (keyPressed == true) {//if keypressed decrease the value of the canvas and change picture
if (keyCode == LEFT) {
canvas--;
}
}
}
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/B5EovID.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Galaxy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/TD-Garden_T1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.