How to tell if Bridge CS3 can modify XMP?
Hi Folks,
How can one tell, using a JavaScript for Bridge CS3, if XMP for a particular Thumbnail can be added or modified by Bridge? I'm currently using the sample code below from Bridge CS3's SnpModifyMetadata JavaScript to write the XMP to the Thumbnail:
// ...SNIP...
// xmp is a XMPMeta object, thumb is a Thumbnail object
var updatedPacket = xmp.serialize(
XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER |
XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
// Have Bridge update the thumbnail's metadata.
thumb.metadata = new Metadata(updatedPacket);
So, is there a way that a script can tell if the "thumb.metadata =" line actually knows how to add XMP to the Thumbnail before calling it? Also, if XMP can be added, what is the best way to tell if the XMP was successfully updated/added?
I know I can use the XMPFile object's canPutXMP() method from the AdobeXMPScript library, but the documentation states that Bridge can support more formats than AdobeXMPScript library can, so, since I'm using Bridge to do the update, I don't think this helps me. But maybe I'm wrong?
One more question, can Bridge add XMP to a file that doesn't already contain XMP information? I ask because the SnpModifyMetadata JavaScript file doesn't try to do anything with a thumbnail's XMP if it doesn't contain any XMP.
Thanks in advance for help!!
-- Jim
