load() - Media Method
The load() method loads an image into the Media object from the specified file. For a detailed list of file format load (read) support, see File Format Support.
Note: In MediaRich version 3.6 and later, load() does not perform any color conversion. For instance, additional parameters for Color Profile Specifications srcProfile, destProfile, and intent are not supported. You must explicitly call convert() or colorConvert() to change an image type.
The following file formats support file sizes greater than 4GB: .tif (BigTIFF), .psb, and .pdf.
Important: Loading, modifying, and saving very large image files can result in errors or crashes when the system cannot accommodate these files. For more information, see Memory Issues with Very Large Image Files.
Also, when working with large images, ensure that your page file size is set to "System Managed Size" on the enabled drive and make sure that the drive has enough space to contain it.
The following file formats support the CMYK colorspace: .ai, .eps, .pdf, .psd, .tif, and .jpg.
Syntax
load(
[name @ <"filename", "http://server_name/../filename", "ftp://username:password@ftp.server_name/../ filename", "ftp://ftp.server_name/../filename", "virtualfilesystem:/filename">]
[type @ <"typename">]
[detect @ <true, false>]
[LoadMetadata @ <true, false>]
[frames @ <"frames list">] // TIFF, GIF, PS, PDF, INDD files only
[layers @ <"layer list">] // PSD files only
[collapsed @ <true, false>] // PSD files only
[VisibleOnly @ <true, false>] // PSD files only
[PreviewAlpha @ <true, false>] // PSD files only
[fillalpha @ <true, false>] // PNG files only
[screengamma @ <value 0..10>] // PNG files only
[waplook @ <true, false>] // WBMP files only
[dpi @ <value 1..32767>] // AI, EPS, PDF, and PS files only
[useCMYK @ <true, false>] // AI, EPS, PDF, and PS files only
[intermediateFileName @ <"filePath">] // AI, EPS, PDF, and PS files only
[IgnoreHeader @ <true, false>] // AI, EPS, PDF, and PS files only
[MaxWidth @ <integer value>] // TIFF, JPEG, and PS files only
[MaxHeight @ <integer value>] // TIFF, JPEG, and PS files only
[AllowMangled @ <true, false>] // PNG only
[resolution @ <integer value>] // multi-resolution TIFF
[time @ <seconds>] // SWF files only
[Xs @ <size>] // SWF files only
[Ys @ <size>] // SWF files only
[InterpolationQuality @ <"off"><"auto"><"linear"><"vng"><"ahd"> // Raw Camera only
[WhiteBalance @ <"auto"><"camera">] // Raw Camera only
[AdjustWhiteBalance @ "v1, v2, v3, v4"] // Raw Camera only
[ColorSpace @ <"raw"><"srgb"><"adobe"><"wide"><"prophoto"><"xyz">] // Raw
[NoFujiRotate @ <true><false>] // Raw Camera only
[UseFujiSecondary @ <true><false>] // Raw Camera only
[BadPixelFile @ "<filename>"] // Raw Camera only
[ExternalJPEGFile @ "<filename>"] // Raw Camera only
[FourColorInterpolate @ <true><false>] // Raw Camera only
[HighlightMode @ <0..9>, default = 0] // Raw Camera only
[BlackPoint @ <integer value>] // Raw Camera only
[Brightness @ <0..1>, default = 1.0] // Raw Camera only
[BilateralFilterDomain @ <floating point value>] // Raw Camera only
[BilateralFilterRange @ <floating point value>] // Raw Camera only
[HalfSize @ <true, false >] // Raw Camera only
[Thumbnail @ <true, false >] // Raw Camera only
[Brighten @ <true, false >] // Raw Camera only
[UseEmbeddedMatrix @ <true, false >] // Raw Camera only
[Select @ <number>] // Raw Camera only
[NoStretchRotateRaw] @ <true, false > // Raw Camera only
[DocMode @ <true, false >] // Raw Camera only
[DocModeNoScaling @ <true, false >] // Raw Camera only
[NoiseThreshold @ <number>] // Raw Camera only
[FixContrast @ <true, false>] // Raw Camera only
[PassThrough @ <string>] // Raw Camera only
[Dpi @ <value 1..32767>] // Office only
[Pages @ <pages>] // Office only
[Brightness @ <brightness>] // Office only
[Dither @ <dither>] // Office only
[ImageWidth @ <width>] // Office only
[ImageHeight @ <height>] // Office only
[Grayscale @ <true, false>] // Office only
[Scale @ <scale>] // Office only
);
Note: DPI is supported for non-bitmap (vector) file formats such as AI, EPS, PDF, PS and all Office files in the LibreOffice environment. It has no effect on the loading of bitmap (raster) images such as BMP, Targa, TIFF, GIF, and JPEG.
Basic Parameters
Use the following parameters for basic load() functionality.
|
Parameter |
Usage |
|---|---|
|
name |
Specifies the filename and path (full or relative) of the file to be loaded By default, MediaRich looks for Media in the read file system, which points to the following directory: MediaRichCore/Shared/Originals/Media. You can also load a file from an HTTP or FTP URL using the this parameter. Note: The functionality of loading files from HTTP or FTP sources is enabled by default. If you need to disable this for security reasons, contact your MediaRich administrator. |
|
type |
Specifies the expected file type When this parameter is not specified, the type is derived from the file extension. Valid type names are: bmp, eps, gif, jpeg, png, pict, pcx, pdf, photoshop, ps, tiff, targa, and wbmp. Note: Some image formats are module and/or platform specific. Please visit the support section of the Equilibrium Web site for the most current list. |
|
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. Note: Some image formats do not support the this parameter. If the filename extension is not a recognized type in such a case, the load method returns a "File type wrong" error. Some formats in this list include PDF, AI, EPS, EPSF, PS, and all of the formats handled by LibreOffice. |
|
LoadMetadata |
When true, loads any Exif, IPTC, or XMP metadata associated with the image The default is value false. For more information about metadata support, see MediaRich Metadata Support. |
On-Line Documentation