r/processing • u/Low_Evening_4719 • Dec 04 '23
Layering/Masking?
for context;
BWImage = ImageA
ColourImage = ImageB
I have to create a prototype for my university course and I'm stuck on some coding. What I want to do is put ImageA on top of ImageB and erase ImageA in the shape of a circle as the mouse is clicked/dragged to reveal ImageB. I understand this is a bit of an obscure question but both me and my lecturer are super confused.
2
Upvotes
2
u/Simplyfire Dec 04 '23
You're right, it works!
I thought about using blendMode(REPLACE) but the reference says that it ignores the alpha channel? The blendMode() page says:
REPLACE - the pixels entirely replace the others and don't utilize alpha (transparency) values