A SERVICE OF

logo

80 Chapter 3
Syntax
exportChannel(
Channel @ <"channelname">
[layers @ <"layer list">] // (PSD files only)
);
Parameters
Valid channel names are:
“Blue”, “Green”, “Red”, “Alpha”,
“Cyan”, “Magenta”, “Yellow”, “Black” (CMYK-space)
“Brightness”, “Saturation”, “Hue” (HSV-space)
“Brightness2”, “Saturation2”, “Hue2” (HLS-space)
The default value is Blue.
layers - for PSD files, specifies the layers to be exported. The layer numbers begin at 0
(background) and go up. For more information see “load()” on page 101.
Example
var image = new Media();
image.load(name @ "peppers.tga");
image.exportChannel(channel @ "green");
image.save(type @ "jpeg");
NOTE: Comparing the original CMYK image and the newly generated images in Photoshop will
show the exact inverse results of what Photoshop displays for the separate channels.
fixAlpha()
This function has been removed from MediaScript. If it is encountered, no operation will
be performed.
Adjusts the RGB components of an image relative to its alpha channel. This should be done
when an alpha channel has been manually created for an image. This command will
frequently correct unexpected results in functions that utilize the alpha channel.
Syntax
fixAlpha();
Example
var image = new Media();
image.load(name @ "pasta.tga");
image.fixAlpha();
image.save(type @ "jpeg");