Shayton Equilibrium Kitchen Utensil 2003 User Manual

Page of 194
MediaScript Objects and Methods 127 
• 
• 
• 
previewAtEnd
 
– if set to “true”, writes the TIFF preview at the end of the file. If not 
specified, it defaults to “false” and writes the TIFF preview at the beginning of the file.
Additional Parameter for TIFF Files
endian
 
- indicates the byte order. Values of “big”, “mac”, “motorola”, and “sparc” save 
the data in big-endian byte order. “little”, “pc”, “intel”, and “x86” save the data in little-
endian byte order.
Compression
 - indicates the compression scheme to use. Valid values are:
none 
rle
 - compresses runs of identical byte sequence values into code only a few bytes in 
length
faxg3
 - outputs TIFF files that conform to the Group 3 FAX format.
faxg4
 - outputs TIFF files that conform to the Group 4 FAX format. 
jpg
 - outputs TIFF files using the JPEG compression scheme.
NOTE: 
When the JPG compression scheme is specified, a CompressionQuality parameter can 
optionally be supplied in the save() function. CompressionQuality sets the level of quality on 
a scale from 0 to 100. This parameter controls the quality vs. compression ratio — high values 
produce large files with better quality and lower values produce smaller files with poorer quality. 
lzw
 - outputs a lossless, dictionary-based compression, which results in fair 
compression ratios (for most images, it produces a compression ratio of about 2:1). 
packbits
 - uses a Run-Length Encoded (“RLE”) compression.
Example
var image = new Media();
image.load(name @ "peppers.tif");
image.save(type @ "gif", interlaced @ true, loopcount @ 100, 
removeduplicates @ true, delay @ 400);
s a v e E m b e d d e d P r o f i l e ( )
Saves the profile embedded in an image to the disk file specified. 
Syntax
saveEmbeddedProfile( 
        name @ <"filename.icc"> 
        ); 
Parameters 
name
 - specifies the name of the file where the profile is to be stored. The string must be in 
quotes. If the string does not specify a file system the default is the color file system. See 
“File Systems” on page 14
 
for more information.