/* * Demonstration of an oval mask. */ size(408, 300); // original image is 408x300 PImage slu = loadImage("http://business.slu.edu/uploads/2012/11/08/slu-homepage-campus4.jpg"); int w = slu.width; int h = slu.height; // create the mask image PGraphics mask = createGraphics(w, h); mask.beginDraw(); mask.background(0); mask.fill(255); mask.ellipse(0.5*w, 0.5*h, w, h); mask.endDraw(); // apply the mask to the original image slu.mask(mask); // draw masked image over a black background background(0); image(slu, 0, 0);