Shayton Equilibrium Kitchen Utensil 2003 Manuale Utente
64
Chapter 3
•
•
•
•
•
If Source or Name is not specified, MediaRich will perform a color-fill when you also
specify the Color parameter. For example, if you composite without naming a source, and
specify the color green (0x009900), the green will appear composited over the entire
background or onto the area of the background as specified through a selection (as with the
following example).
specify the Color parameter. For example, if you composite without naming a source, and
specify the color green (0x009900), the green will appear composited over the entire
background or onto the area of the background as specified through a selection (as with the
following example).
var image = new Media()
var image2 = new Media();
image.load(name @ "car.tga");
image2.load(name @ "mskcar.tga");
image.selection(source @ image2);
image.composite(color @ 0x009900);
image.save(type @ "jpeg");
Onto
- when specified, the system composites the source onto the loaded image. This way
the current media acts like the source, and the loaded one acts like the background. The
user can construct a source image and then composite it onto another image without
having to cache the source.
user can construct a source image and then composite it onto another image without
having to cache the source.
NOTE:
Trying to composite an RGB image onto a CMYK image or vice versa results in the process
stopping at the composite() line with an error.
Opacity
- specifies opacity of the source image. The default value is 255 (completely
solid).
NOTE:
If the source image already has an alpha channel that renders it less than solid, specifying
opacity can only make it less opaque; it cannot override the alpha channel to make it more opaque.
Specifying a color value for
Unlock
causes the selected foreground (source) image to
display only where the specified color value appears in the current (background) image.
Color
- colorizes the source image. Any transparency or masking still behaves normally.
This allows a source image to be used as a pattern that can be composited in any color,
without having to create a new image first. For more information about colorizing an
image, see
without having to create a new image first. For more information about colorizing an
image, see
.
If a color palette exists for the source image, you can use the
Index
parameter to colorize
the image (as an alternative to the
Color
parameter).
NOTE:
You cannot specify values for both the Color and Index parameters.
Saturation
- specifies the value used for weighting for the change in saturation for
destination pixels. A value of 255 changes the saturation of pixels to the specified color. A
value of 128 changes the saturation of a pixel to a mid-value between the pixel’s current
color and the specified color.
value of 128 changes the saturation of a pixel to a mid-value between the pixel’s current
color and the specified color.
NOTE:
The Saturation parameter only functions when the Blend parameter is set to
“colorize.”
FixAlpha
- if set to “true, this is equivalent to applying the
may be required with some images to get the expected results.
PreserveAlpha
- when set to true, preserves the alpha channel of the target image as the
alpha channel of the resulting image. The default is false.