PImage imgLogo; PImage imgTextur; PFont font; void setup() { // set size size(500,333); // load font font = loadFont("HelveticaNeue-Bold-20.vlw"); textFont(font); // load images background(loadImage("masaimara.jpg")); imgLogo = loadImage("logo2.png"); fill(255,255,255,100); text("Press 0 to 9 to apply blend effects", 90, 50); } void draw() { } void keyPressed() { if (key == '1') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, ADD); fill(100,100,100,100); text("Overlay/Blend effect: Additive", 10, 30); } else if (key == '2') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, SUBTRACT); fill(100,100,100,200); text("Overlay/Blend effect: Subtract", 10, 30); } else if (key == '3') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, MULTIPLY); fill(100,100,100,100); text("Overlay/Blend effect: Multiply", 10, 30); } else if (key == '4') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, EXCLUSION); fill(200,200,200,100); text("Overlay/Blend effect: Exlusion", 10, 30); } else if (key == '5') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, DIFFERENCE); fill(200,200,200,100); text("Overlay/Blend effect: Difference", 10, 30); } else if (key == '6') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, SCREEN); fill(100,100,100,100); text("Overlay/Blend effect: Screen (opposite of Multiply)", 10, 30); } else if (key == '7') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, OVERLAY); fill(100,100,100,100); text("Overlay/Blend effect: Additive", 10, 30); } else if (key == '8') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, HARD_LIGHT); fill(100,100,100,100); text("Overlay/Blend effect: Hard Light", 10, 30); } else if (key == '9') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, DODGE); fill(100,100,100,100); text("Overlay/Blend effect: Dodge\n(lightens tones, increases contrast, ignores darks)", 10, 30); } else if (key == '0') { background(loadImage("masaimara.jpg")); blend(imgLogo, 0, 0, width, height, 0, 0, width, height, LIGHTEST); fill(100,100,100,100); text("Overlay/Blend effect: Lightest", 10, 30); } }