Alpha Mask with PGraphics "img.jpg" is the background image that I load in backgroundimage."mask.jpg" is the grayscale image used as a mask. It's loaded in maskimage. Then maskimage is drawn to a PGraphics object and this PGraphics is used as the mask. (I couldn't use a PImage as a mask if it was not the applet's size.) They must be in this sketch's data folder. Left click to change the mask, right click to invert it...
Source code: mask03
Built with Processing