|
Author |
Topic: Alpha mask with BImage.alpha() (Read 260 times) |
|
mflux
|
Alpha mask with BImage.alpha()
« on: Nov 1st, 2003, 12:34am » |
|
How do you use this? I've been fooling around with it for an hour now. My program goes as follows: BImage tester; BImage hexalpha; void setup() { size(500,500); hexalpha=loadImage("hexalpha.jpg"); hexalpha.format=ALPHA; tester=loadImage("testimage.jpg"); tester.alpha(hexalpha); } void loop() { background(0); image(tester,0,0); } Simply: load two images and set one of them to be the alpha mask of the other. This does not appear to be working. I have tried many things but I can't get it to mask. Any help would be great... thanks
|
|
|
|
fry
|
Re: Alpha mask with BImage.alpha()
« Reply #1 on: Nov 3rd, 2003, 5:59pm » |
|
currently, you can create an array of int[] that has values from 0 to 255 in it, and that will be applied as the alpha mask of the image. in rev 68, you will also be able to use the alpha channel from another RGBA image (i.e. a GIF with transparency) as the mask.
|
|
|
|
|