
44 Chapter 3
•
•
•
•
Example
var fileInfo = Media.getFileInfo(name @ "tif/32bit.tif");
for (key in fileInfo)
{
print(key + ":" + fileInfo[key] + "\n");
}
Individual properties can be accessed like this:
var fileInfo = Media.getFileInfo(name @ "tif/32bit.tif");
var width = fileInfo["Width"];
getFileFormats()
Use this method to get a description of the available file formats. It returns an array of
objects describing the available file formats.
Each element of the array contains the following fields:
•
type: The file format type.
•
extensions: A comma-delimited list of file extensions for the format.
•
flags: A bitwise-OR (|) of one or more of the following flags:
Media.FormatLoad -> Indicates that the format is loadable.
Media.FormatSave -> Indicates that the format is saveable.
Media.FormatCmykSave -> Indicates that the format can save CMYK files.
FormatExifLoad -> Use if the format supports loading Exif metadata.
FormatExifSave -> Use if the format supports saving Exif metadata.
FormatIPTCLoad -> Use if the format supports loading IPTC metadata.
FormatIPTCSave -> Use if the format supports saving IPTC metadata.
FormatXMPLoad -> Use if the format supports loading XMP metadata.
FormatXMPSave -> Use if the format supports saving XMP metadata.
Syntax
var fileFormats = Media.getFileFormats();
Parameters
This function takes no parameters.