int gSize =100; PImage p1; PImage p2; //PImage p3; PImage p4; int tCounter = 0; PFont f1; PFont f2; void setup() { size(800, 800); background(0); noStroke(); f1 = createFont("Arial", 60); f2 =createFont("Arial",30); p1 = loadImage("image1.JPG"); p2 = loadImage("image2.JPG"); //p3 = loadImage("image3.JPG"); p4 = loadImage("image4.JPG"); } void draw() { fill(239, 248, 91); textFont(f1); text("Beautiful Images", tCounter, 400); fill(221, 223, 217); textFont(f2); text("Soodie's Photography", 250, tCounter); if (mousePressed) { noTint(); //image(p3, 0, 0, width/2, height/2); image(p4, width/3, height/3, width/3, height/3); // image(p1, width/3, height/3, width/3, height/3); } else { int checkCounter =0; for ( int i = 0; i < height; i+= gSize) { checkCounter++; for ( int j = 0; j < width; j+=(gSize) ) { //mod operatore % if ( (checkCounter % 4) == 0 ) { //image(p1, j, i, gSize, gSize); image(p4, j, i, gSize, gSize); } else { tint(150, 50); image(p2, j, i, gSize, gSize); } checkCounter++; } } } tCounter ++; if (tCounter > width) { tCounter = 20; } recordit(); } void recordit() { if ( frameCount < 500 ) { println(frameCount); saveFrame("frames/ex1_test_####.png"); } else { exit(); } }