Shayton Equilibrium Kitchen Utensil 2003 User Manual

Page of 194
MediaScript Objects and Methods 119 
• 
• 
• 
PreserveAlpha
 - if set to “true”, preserves the alpha channel of the target image as the 
alpha channel of the resulting image. The default is false.
Blend
 - specifies the type of blending used to combine the drawn object with the images. 
Blend options are: “Normal”, “Darken”, “Lighten”, “Hue”, “Saturation”, “Color”, 
“Luminosity”, “Multiply”, “Screen”, “Dissolve”, “Overlay,” “HardLight”, “SoftLight”, 
“Difference”, “Exclusion”, “Dodge”, “ColorBurn”, “Under”, “Colorize” (causes only the 
hue component of the source to be stamped down on the image), and “Prenormal”.
NOTE: 
“Burn” has been deprecated. “ColorBurn” results in the same blend.
Width
 - specifies the thickness (in pixels) of the line that describes the rectangle. The 
default is 1.
NOTE: 
If the Fill parameter is set to true, Width is ignored.
Smooth
 - if set to “true”, makes the edges of the rectangle smooth, preventing a pixellated 
effect. The default is false.
Fill
 - fills in the rectangle with the color specified by the Color or Index parameter. The 
default is false.
Example
var image = new Media();
image.load(name @ "family2.jpg");
image.rectangle(x @ 45, y @ 55, xs @ 283, ys @ 157, width @ 3);
image.save(type @ "jpeg");
r e d u c e ( )
Applies a specified or generated color palette to the image. By default, this function 
generates an optimal palette of 256 colors.
NOTE: 
MediaRich also supports Adobe Color Table (.act) files.
Syntax
reduce(
[Netscape @ <true, false>]
[BW @ <true, false>]
[LowMem @ <true, false>]
[Pad @ <true, false>]
[PreserveBackground @ <true, false>]
[NoWarp @ <true, false>] 
[Name @ <
"Palettes/filename.pal", 
"virtualfilesystem:/filename.pal">]
[Colors @ <1 to 256>]
[Dither @ <value 0..10>]
[DitherTop @ <value 0..10>]
[layers @ <"layer list">] // (PSD files only)
);