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 syntax problem
Page Index Toggle Pages: 1
mask syntax problem (Read 276 times)
mask syntax problem
Aug 13th, 2006, 6:30am
 
Hoping you guys can help me?!  Here is a piece of code:

 void draw() {
   sourceImg.mask(maskImg);
   image(sourceImg, xPos, yPos, objW, objH);
 }

sourceImg and maskImg are jpgs loaded randomly from list elsewhere in the sketch.  All of the jpgs are 800x600 as is my applet window size.  Yet I get the following error pointing to the sourceImg.mask line at random intervals...

"The PImage used with mask() must be the same size as the applet."

Now i've followed the line of thought that it could be because the sourceImg is rescaled by objW and objH and changed the code to static values == to the applet window size however this does not work.  I've checked and checked the jpgs and they are all 800x600 no acceptions.

Any idea why I might be getting this error?

chrs
][oyd
Page Index Toggle Pages: 1