User's Manual
164 Chapter 3
•
•
•
•
•
Multi-Frame Parameters
Multi-frame files (such as GIF and TIFF) are a special case, because the files contain more
than one frame. MediaScript supports a “frames” parameter that can be included with all
transform commands for processing specific frames within a multi-frame file.
NOTE: Multi-frame parameters can be used with the save() command, but not the load()
command.
frames - specifies a single frame, or a complex group of frames using a frame list. A frame
list must be enclosed in quotes, and allows a comma separated list of individual frames or
ranges. You can also specify a frame skip parameter to apply the relevant command to
every nth frame.
NOTE: The first frame in a multi-frame file is frame “1”.
Examples
image.load(name @ "clock.gif");
image.flip(axis @ "horizontal", frames @ "5");
image.save(name @ "flip5.gif");
This script flips the 5th frame of the file clock.gif.
image.load(name @ "clock.gif");
image.flip(axis @ "horizontal", frames @ "1,5,7-10");
image.save(name @ "multiflip.gif");
This script flips the 1st, 5th, 7th, 8th, 9th, and 10th frames of the file clock.gif.
image.load(name @ "clock.gif");
image.flip(axis @ "horizontal", frames @ "4-10-2");
image.save(name @ "flipskip.gif");
This script flips the 4th, 6th, 8th, and 10th frames (for example, every 2nd frame) of the file
clock.gif.
MediaScript Global Functions
The MediaScript global functions are:
•
CmykColor
•
COMCreateObject()
•
error()
•
getPropertyValue()
•
getScriptFileName()
•
print()
•
rgb()
•
RgbColor Object
•
version()










