We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › mask on top of random images //beginner :)
Page Index Toggle Pages: 1
mask on top of random images //beginner :) (Read 471 times)
mask on top of random images //beginner :)
Dec 10th, 2007, 3:20am
 
hello,
I ve created a random collage of images with 7 arrays and 7 randoms ints and i want them all to be masked by a png image i' ve created. i loaded the mask image but i don't know how to tell it to mask all the photos in the arrays. any ideas? :)
thanxxxx
Re: mask on top of random images //beginner :)
Reply #1 - Dec 10th, 2007, 6:53am
 
if I understood well, you just have to display your PNG image using the image() method :

Code:
// load the mask image
PImage mask = loadImage("mask.png");

// draw your random collage here

// then apply the mask
image(mask, 0, 0);
Page Index Toggle Pages: 1