FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   img.alpha
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: img.alpha  (Read 239 times)
gabon

WWW
img.alpha
« on: Jun 28th, 2004, 3:03pm »

if I put this code in a new file:
 
size(400, 150);
BImage img = loadImage("numeri.png");
BImage alphaImg = loadImage("numeri_mask.jpg");  
img.alpha(alphaImg);  
image(img, 0, 0);
 
It says to me "Cannot find method alpha(BImage)"
 
How to put also this script in the setup scope?
 
thx, chr
 
toxi_
Guest
Email
Re: img.alpha
« Reply #1 on: Jun 28th, 2004, 8:33pm »

which version are you using? if that doesn't work for you, i assume you are using an older version of processing where the alpha() function was still unavailable?! also, "img" and "alphaImg" need to be of the same pixel size.
 
to have the code inside setup() write it like this:
 
Code:
void setup() {
  size(400, 150);
  BImage img = loadImage("numeri.png");
  BImage alphaImg = loadImage("numeri_mask.jpg");  
  img.alpha(alphaImg);  
  image(img, 0, 0);
}

 
gabon

WWW
Re: img.alpha
« Reply #2 on: Jun 28th, 2004, 11:26pm »

REV 0055 it seems... how to get e new version?
 
thx, chr
 
Pages: 1 

« Previous topic | Next topic »