User's Manual
104 Chapter 3
•
•
•
•
•
loadAsRgb()
The loadAsRgb() function is an add-on to the Media object that acts exactly like load()
does when an RGB file is read. When a CMYK file is read, the images in the file are
converted to RGB. This function is defined in Sys/media.ms.
Syntax
loadAsRgb(
[name @ <"filename">]
[type @ <"typename">]
[detect @ <true, false>]
[transform @ <true, false>] // (FPX files only)
[layers @ <"layer list">] // (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>] // (EPS, PDF, and PS files only)
[sourceProfile @ <"filename.icc">]
[destProfile @ <"filename.icc">]
[intent @ <"rendering intent">
[overrideEmbedded @ <true, false>]
);
Parameters
name, type, detect, transform, layers, fillalpha, screengamma, waplook, and
dpi - these parameters operate the same as for the load() function. For more information,
see “load()” on page 101.
sourceProfile, destProfile, intent, and overrideEmbedded - used to determine
how this conversion is performed. If any of these parameters are not supplied, the current
defaults (as specified in the properties file) are used instead.
NOTE: If the destProfile parameter is specified, the resulting image will be in the colorspace
of the specified profile. If this profile does not have an RGB colorspace, the resulting image will NOT
be an RGB image.
Example
#include "Sys/media.ms"
var image = new Media();
image.loadAsRgb(name @ "myCmykImage.tif");










