A SERVICE OF

logo

MediaScript Objects and Methods 65
IgnoreAlpha - when set to true, the source is composited onto the target and alpha
channel information is ignored. The default is false.
X and Y - specify the position of the source image, with the center as anchor point. For
example, if “x @ 100, y @ 50" is specified, the center of the source image will be located
at pixel (100,50) on the target image. If these parameters are not specified, the center of the
source image is located at pixel (0,0).
HandleX and HandleY - specify the attachment point of the source image. The default
values are center and middle.
Tile - when set to true, the source image wraps continuously along both the x and y axis
so that it spans the entire target image. The tiling starts in the location specified by the X
and Y and HandleX and HandleY parameters. If not specified, tiling starts from the target
image’s center.
NOTE: If the source image is larger than the target image, setting the Tile parameter to true has
no effect, unless the source image is sufficiently offset from the center to allow this effect to display.
Blend - specifies the type of blending used to combine the drawn object with the images.
Blend modes 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”.
This function supports CMYK for the following blend modes: “Normal”, “Darken”,
“Lighten”, “Screen”, “Multiply”, “Dissolve”, “Overlay”, “HardLight”, “SoftLight”,
“Difference”, “Exclusion”, “Burn”, “Dodge”, “Under”, “Copy”, and “PreNormal”. The
other modes (Hue, Saturation, Color, Luminosity, and Colorize) are not supported for
CMYK. You must first convert to RGB using colorCorrect() and then perform the
composite. Additionally, composite cannot be performed unless both images are either
CMYK or RGB.
Example
var Target = new Media();
var Source = new Media();
Target.load(name @ "pasta.tga");
Source.load(name @ "logo.tga");
Target.composite(source @ Source, x @ 100, y @ 150);
Target.save(type @ "jpeg");