A SERVICE OF

logo

MediaRich Metadata Support 171
The _MR_Metadata constructor takes a file name and an optional file type.
var metaObj = new _MR_Metadata(“myimage.jpg”, “jpeg”);
If the file has a valid extension, the file type may be omitted.
The _MR_Metadata save command provides a single object as a parameter, in a manner
similar to the Media object save command. This parameter may be specified as an object,
or using the ampersand ("@") notation.
The parameters for the save command object are exif, iptc, xmp, and name. The file type
of the result is always the same as the file type of the original image.
metaObj.save( exif @ myExifDoc, iptc @ null, xmp @ null,
name @ “newFile”);
or
var saveObj = new Object();
saveObj.iptc = null;
saveObj.xmp = null;
saveObj.exif = myExifDoc;
saveObj.name = “newFile”;
metaObj.save(saveObj);
If any of the exif, iptc, or xmp parameters are omitted, existing metadata of that type in the
file will be transferred to the output file. If any of the exif, iptc, or xmp parameters are
specified as null, existing metadata of that type will be omitted in the output. Otherwise,
IPTC and XMP data will be replaced with the specified data, and writable Exif tags will be
replaced. The Exif camera data tags are never replaced.