Image Masks - Completely lost
Bob Warren
robertum at brturbo.com
Tue Dec 27 17:24:05 EST 2005
I am trying to apply a mask to an image without any success whatsoever
in getting it to work correctly. Would someone be kind enough to give me
an example of how it might be done? My experiments with "imagedata" and
"alphadata" have so far failed.
Let's outline a simple spec:
1. I have a normal full coloured image on the left of my window, loaded
from an RGB PNG file. The image box is called "fullcolour".
2. I have another image in the middle of my window which is exactly the
same size as the one on the left. The image it contains consists of a
big, black circle on a white background. The image was also loaded from
an RGB PNG file. The image box is called "themask".
3. There is an empty image box on the right called "result".
4. If I click on button "showblack", the black ball mask in the middle
image is applied to the image on the left to show the ball portion only
of the coloured picture in the "result" image on the right. It has a
surround of the original grey colour.
5. Alternatively, if I click on button "showwhite", the ball-surround
portion of the mask is applied to the "fullcolour" image on the left,
producing the original coloured image with a grey round hole in the
middle in "result".
Any hints regarding file types that can be used (e.g. PNG, JPG, BMP,
etc.), the richness of bits (e.g. 2-bit, 8-bit, 16-bit, 32-bit, etc.)
and so on, for the original coloured picture and the mask picture, would
be greatly appreciated.
Also, can anyone recommend useful webpages elucidating this kind of
thing? The RR HELP hasn't helped me very much so far, I'm afraid.
Thanks.
More information about the use-livecode
mailing list