Contour rectangle with an ellipse

Hi @guidoDimasi ,

Welcome to the forum! :wink:

You can use the PImage.mask() function to do that :

Masks part of an image from displaying by loading another image and using it as an alpha channel. This mask image should only contain grayscale data, but only the blue color channel is used. The mask image needs to be the same size as the image to which it is applied.

You can also check a previous message I did on a masking technique with PGraphics :

2 Likes