A SERVICE OF

logo

84 Chapter 3
Example
if (image.getHeight() == 480)
{...
getImageFormat()
Returns a string representing the image type: “8 Bit Palette”, “8 Bit Grayscale”, “15 Bit
5-5-5”, “16 Bit 5-6-5”, “16 Bit 1-5-5-5”, “18 Bit 6-6-6”, “24 Bit”, “32 Bit RGBA”, “32 Bit HSV”,
“32 Bit HLS”, or “Undefined”.
NOTE: GetImageFormat() has been deprecated. getPixelFormat() is the preferred
function and will be supported in future versions of MediaScript.
Syntax
<object name>.getImageFormat();
Parameters
This function has no parameters.
Example
var image = new Media();
image.load(name @ "peppers.psd");
if(image.getImageFormat() == "24 Bit")
{...
getInfo()
Returns the system version information. It is recommended for advanced users only.
Syntax
<object name>.getInfo(
<"argument">
);
Parameters
It takes one of these arguments as a string: “all”, “devices”, “commands”, or “filing”.
Example
var image = new Media();
error(image.getInfo("all"));
getLayer()
Returns a Media object for the specified layer (if available); otherwise returns “undefined”.
It takes the specified layer index (starting from zero) as an argument.
Syntax
<object name>.getLayer(
<layer number>
);