Справочник Пользователя для Shayton Equilibrium Kitchen Utensil 2003
MediaScript Objects and Methods 103
•
•
•
•
•
layers
- loads the specified layers. Specify the layers to collapse and the order in which
to collapse them. The layer numbers begin at 0 (background) and go up. To specify all
layers (including non-visible layers) use the wild-card notation “*”. The visibleOnly()
function may used to load only the visible layers of a PSD file.
layers (including non-visible layers) use the wild-card notation “*”. The visibleOnly()
function may used to load only the visible layers of a PSD file.
NOTE:
MediaRich loads only the image data from the layers and ignores all other effects. To
preserve such effects, merge the effects into the layer data in Photoshop. You can specify the layers
out of order, and they are composited accordingly.
out of order, and they are composited accordingly.
The layer list must be contained in quotes and consists of comma-separated entries. You
can specify ranges (“0-2”) or individual layers (“0,2”).
can specify ranges (“0-2”) or individual layers (“0,2”).
NOTE:
When you specify a comma-separated list of layers, do not leave any spaces after the
commas.
If the Photoshop file has named layers, you can use the layer names (up to 31 characters)
in place of layer numbers. You can also use the “*” as a wildcard when specifying layers.
For example:
in place of layer numbers. You can also use the “*” as a wildcard when specifying layers.
For example:
image.load(name @ "horizontal.psd", layers @ "B*")
This line of script loads all layers whose names begin with “B” (such as Boy, Baseball,
Ballcap, and so on). The layers command is case-sensitive, so the example line of script will
not flip layers that begin with a lowercase “b”.
Ballcap, and so on). The layers command is case-sensitive, so the example line of script will
not flip layers that begin with a lowercase “b”.
NOTE:
All Photoshop Adjustment Layers must be merged into the layer image data prior to use in
MediaRich.
VisibleOnly
- when set to “true” and loading photoshop layers (collapsed is set to
“false”), only the layers designated as visible are loaded. The default is false.
PreviewAlpha
- when set to “false” and layers are not specified, the loaded image’s
preview will not contain the preview alpha channel.
Parameters for FPX Files
transform
- when set to “true”, performs any transformations that are embedded in the
FPX file. The default is false.
Parameters for PNG Files
fillalpha
- when set to “true”, fills transparent and translucent pixels with the image’s
background color. The default is false.
screengamma
- specifies a floating gamma point, causing the reader to perform a gamma
correction if the file contains a specified gamma value. The default is 0 (no correction).
Parameter for WBMP Files
waplook
- when set to “true”, sets the image’s palette to simulate the look of an LCD
screen on an actual WAP device.
Example
var image = new Media();
image.load(name @ "peppers.tga", type @ "targa");
image.save(type @ "jpeg");