Im using processing with java. I have a transparent background png drawing I made, it sort of looks like an abstract leaf, sort of like matisse. I know how to create shapes with random colors chosen from an array, so i can display that shape with different background colors for each frame in a loop, saving each. what I want to do next is create another layer over the drawing that is populated with a random color from my array, but to have that layer display only on the pixels from the underlying png that is loaded.
the end result is the ability to put out an endless number of randomly colored versions of that leaf design, with a random background color. I just havent figured out how to create this kind of clipping mask effect.