[ANN] More about Masks Rev3
Wilhelm Sanke, FB01
sanke at hrz.uni-kassel.de
Wed Jan 7 16:09:39 EST 2009
To run this sample stack you need engine version 3.0 or higher:
What's new in this version?
- Create mask with "export snapshot to variable" / card "Creating masks"
- Create masks with integrated "gradient tools" / card "Using gradient tools"
- Optionally transparent frames for all masked images / card "Mask images as
1. Button "export snapshot to variable" was proposed by Bernd Niggemann. Instead
of exporting the snapshot to an external file, it is placed first in a variable
and then the text of a "hidden image" is set to that variable.
This procedure is about 10% faster than exporting the snapshot to an external
file and then re-importing the image.
2. Creating masks with "Gradient Tools"
Bernd Niggemann came up with the idea to integrate the gradient tools of Rev 3.0
into this stack.
We present two slightly different approaches on card "Using gradient tools"
- the essential elements of Bernd's original solution in the box on the right
- the elements of my somewhat alternative approach in the box on the left
and the buttons common to both solutions in the middle, namely "showing/hiding
the edit-mode controls", "disabling gradient work", "setting the gradient type"
(linear, radial,conical, diamond, spiral, XY, SqrtXY), "setting the repeat
pattern", "wrap", "mirror".
Bernd creates a mask by transforming the gray values of a snapshot into
My alternative option is based directly on the transparency values of a snapshot.
The masked images created with the two approaches can be indeed identical, but
in many cases differ considerably. Just experiment to find out the identities
"Enable--Gradient 1" and "Enable--Gradient 2" generate different values and
configurations, as do the slider scrollbars on the left and right. Be sure to
move the sliders at least for a tiny distance - both of them! - when you change
from one approach to the other.
With "Choose graphic shape" you set the form of the selection graphic, either
"oval" or "rectangular". "Oval" is the default.
3. On card "Mask Images as Selection Tools" I have added the option to add
frames of varying transparency to masked images of all shapes.
After you have created a masked image, a button "add frame" appears which lets
you choose the level of transparency for the frame and then adds a "frame"
exactly fitting the chosen shape.
There are now 11 image shapes that can be set to various sizes and forms and to
which such frames can be optionally added.
This mail sent through http://www.uni-kassel.de/www-mail
More information about the Use-livecode