Sorry for the late reply- we’ve been traveling!
I don’t yet have a list of public functions on asset- it’s basically going to be folks asking for things, and then me coming up with something.
Setting metadata is pretty easy to add- but getting the keys and dictionary values is going to be annoying from the programmer’s side. Here’s an example on how to se the DPI:
function processAsset(document, jsnode, asset) {
asset.setImageMetaDataValue_forKey_inDictionary(123, "DPIWidth", null);
asset.setImageMetaDataValue_forKey_inDictionary(123, "DPIWidth", null);
asset.setImageMetaDataValue_forKey_inDictionary(123, "XResolution", "{TIFF}");
asset.setImageMetaDataValue_forKey_inDictionary(123, "YResolution", "{TIFF}");
return true;
}
To get the image metadata, you can call imageMetaData()
on asset, which returns a dictionary you can read from.
Is that the type of thing you’re looking for?