diff --git a/BasicImages/BasicImages.pde b/BasicImages/BasicImages.pde index 8b13789..1bc2b42 100644 --- a/BasicImages/BasicImages.pde +++ b/BasicImages/BasicImages.pde @@ -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); + } +} \ No newline at end of file diff --git a/FilteringImages/FilteringImages.pde b/FilteringImages/FilteringImages.pde index 8b13789..caa76b9 100644 --- a/FilteringImages/FilteringImages.pde +++ b/FilteringImages/FilteringImages.pde @@ -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); +} \ No newline at end of file diff --git a/FilteringImages/data/GRD2014_wide_logo-1920x1200.jpg b/FilteringImages/data/GRD2014_wide_logo-1920x1200.jpg new file mode 100644 index 0000000..591f74c Binary files /dev/null and b/FilteringImages/data/GRD2014_wide_logo-1920x1200.jpg differ diff --git a/IndependentImagePractice/IndependentImagePractice.pde b/IndependentImagePractice/IndependentImagePractice.pde index 8b13789..6a8500b 100644 --- a/IndependentImagePractice/IndependentImagePractice.pde +++ b/IndependentImagePractice/IndependentImagePractice.pde @@ -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--; + } + } +} \ No newline at end of file diff --git a/IndependentImagePractice/data/6819282-jets-wallpaper.jpg b/IndependentImagePractice/data/6819282-jets-wallpaper.jpg new file mode 100644 index 0000000..04705b6 Binary files /dev/null and b/IndependentImagePractice/data/6819282-jets-wallpaper.jpg differ diff --git a/IndependentImagePractice/data/B5EovID.jpg b/IndependentImagePractice/data/B5EovID.jpg new file mode 100644 index 0000000..7e3969a Binary files /dev/null and b/IndependentImagePractice/data/B5EovID.jpg differ diff --git a/IndependentImagePractice/data/Carina_Dwarf_Galaxy.jpg b/IndependentImagePractice/data/Carina_Dwarf_Galaxy.jpg new file mode 100644 index 0000000..3b29b88 Binary files /dev/null and b/IndependentImagePractice/data/Carina_Dwarf_Galaxy.jpg differ diff --git a/IndependentImagePractice/data/GRD2014_wide_logo-1920x1200.jpg b/IndependentImagePractice/data/GRD2014_wide_logo-1920x1200.jpg new file mode 100644 index 0000000..6d6075f Binary files /dev/null and b/IndependentImagePractice/data/GRD2014_wide_logo-1920x1200.jpg differ diff --git a/IndependentImagePractice/data/Galaxy.jpg b/IndependentImagePractice/data/Galaxy.jpg new file mode 100644 index 0000000..89d668a Binary files /dev/null and b/IndependentImagePractice/data/Galaxy.jpg differ diff --git a/IndependentImagePractice/data/New-York-Jets-2014-Football-Logo-Wallpaper.jpg b/IndependentImagePractice/data/New-York-Jets-2014-Football-Logo-Wallpaper.jpg new file mode 100644 index 0000000..67165fe Binary files /dev/null and b/IndependentImagePractice/data/New-York-Jets-2014-Football-Logo-Wallpaper.jpg differ diff --git a/IndependentImagePractice/data/TD-Garden_T1.jpg b/IndependentImagePractice/data/TD-Garden_T1.jpg new file mode 100644 index 0000000..f5b3b9a Binary files /dev/null and b/IndependentImagePractice/data/TD-Garden_T1.jpg differ diff --git a/IndependentImagePractice/data/boston-celtics-logo-wallpaper-1024x768.jpg b/IndependentImagePractice/data/boston-celtics-logo-wallpaper-1024x768.jpg new file mode 100644 index 0000000..d4301f1 Binary files /dev/null and b/IndependentImagePractice/data/boston-celtics-logo-wallpaper-1024x768.jpg differ diff --git a/IndependentImagePractice/data/harbour_bridge_in_grayscale_by_brichards85-d3a9yoh.jpg b/IndependentImagePractice/data/harbour_bridge_in_grayscale_by_brichards85-d3a9yoh.jpg new file mode 100644 index 0000000..3c7d432 Binary files /dev/null and b/IndependentImagePractice/data/harbour_bridge_in_grayscale_by_brichards85-d3a9yoh.jpg differ diff --git a/IndependentImagePractice/data/sydney_harbour_bridge_1.jpg b/IndependentImagePractice/data/sydney_harbour_bridge_1.jpg new file mode 100644 index 0000000..b55b9c5 Binary files /dev/null and b/IndependentImagePractice/data/sydney_harbour_bridge_1.jpg differ