
102 Chapter 3
•
•
•
•
detect - indicates that if a matching file type is not found, or if the load returns with a
FileMangled or FileTypeWrong error, the system will attempt to automatically determine
the file's type and load it accordingly.
LoadMetadata - if specified as “true”, any Exif, IPTC, or XMP Metadata associated with
the image is loaded. The default is “false”. For more information about MediaRich’s
metadata support, see Appendix A, “MediaRich Metadata Support.”
Default Page Range and Specification of Page Range for PS, EPS, and PDF
dpi - use this parameter for EPS, PDF, or PS source files to determine the size of the image
after it is loaded. The default is 72. In addition, when loading one of these source files only
the first page/frame of the file is loaded by default. To load more than just the first page,
the “frames” parameter must be specified with a page range. To load the entire file when
the length is not known, either of the following will work:
•
frames “1-0”
•
frames “1-999999” (assuming there aren't more than 999999 pages)
Frames can also select some subset of all pages in the file, and a single frame may also be
specified. In addition, “frame” is a valid alias for “frames”. Any of the following are valid:
•
frames “3-9”
•
frames 7
•
frame 12
•
frame “4-9”
Intermediate File Specification
Instead of rendering pages into the source Media, you can use the load() function to
render eps/pdf/ps/ai files into a multi-frame TIFF file. This method avoids having to read
an entire multi-page file into memory at once.
temporaryFileName - specifies the TIFF file to render into, and specifies that file not be
deleted after the operation completes. The normal load() operation is not otherwise
affected, so pages may still be rendered into the source Media as well. If the user wishes to
not render any pages into the source Media, they can specify that only frame 0 (zero) be
rendered. The following is an example of how to render into a TIFF file without adding any
frames to the Media:
img.load(name @ "anImage.ps", temporaryFileName @ "foo.tif",
frame @ 0);
NOTE: You will get an error message if you try to load a Photoshop image that includes an
adjustment layer.
Additional Parameters for Photoshop Files
When loading a Photoshop file, MediaRich by default loads a single raster, created by the
Photoshop application. Photoshop creates this raster based on the visible layers contained
in the PSD file.
collapsed - when set to “false”, overrides the single raster default loading.