
MediaScript Objects and Methods 125
•
•
•
•
Parameters
name - specifies the name used to save a file to an FTP URL.
image.save(name@"ftp://jdoe:ax24z87@ftp.equilibrium.com/ test.gif");
NOTE: FTP support is disabled by default for security reasons. Contact your MediaRich
Administrator to enable this functionality.
image.save(name@"ftp://jdoe:ax24z87@ftp.equilibrium.com/ test.gif");
type - specifies the file type of the saved image; otherwise, the type is derived from the
extension of the file name. Valid type names are: “bmp”, “eps”, “gif”, “jpeg”, “pcx”, “pict”,
“png”, “ppm”, “psd”, “swf”, “tiff”, “targa”, and “wbmp”.
Saving an image as an SWF file creates a single-frame animation that can then be imported
into a Flash movie.
NOTE: The following formats support saving in the CMYK color-space: “.eps”, “.psd”, “.tif”, and
“.jpg”.
embedICCProfile - if set to “true”, indicates that any destination profile associated with
the image be embedded if the file format supports this.
NOTE: The save() function supports ICC profiles for EPS, JPEG, PSD and TIFF files. However,
save() has been deprecated and no longer does any color conversion. ColorCorrect() must
now be used explicitly for converting from RGB to CMYK (or visa versa). Parameters for Color
Profile Specifications (srcProfile, destProfile, and intent) are no longer supported by save().
SaveMetadata - if specified as “true”, any metadata associated with the image will be
embedded in the image. If the target file format does not support metadata, this parameter
has no effect. For more information about MediaRich’s metadata support, see Appendix A,
“MediaRich Metadata Support” on page 169.
Additional Parameters for GIF Files
Loopcount - sets the number of times the frames plays after loading. The default is 0
(infinite looping).
Removeduplicates - if set to “true”, causes the GIF writer to remove duplicate frames
and combine their delay times into a single frame. The default is false.
Delay - sets the delay time (in hundredths of a second) for all frames in the GIF, overriding
any values that are stored in each frame.
DisposalMethod - indicates the mode of compression used when saving the GIF. The
possible modes are:
•
Auto - this is the default behavior if no option is specified. It determines the best
compression using all of the GIF specification features.
•
Compatible - this mode sets compatibility for Netscape and Opera browsers. The GIF
writer still automatically calculates delta rectangles for each frame and does transparent
color compression, but replaces any “restore-to-previous” instructions in the GIF with
“restore with background”.
NOTE: The Compatible mode may result in a less efficient GIF, depending on how the pixels are laid
out in each frame. There will be no difference if the GIF is not animated and has no transparent areas
that are visible down to the browser's background.