I'm looking for a script that will erase all meta data from an image that I can put in the event manager to run whenever I save.
I work with renderings, not photos, and some of my software inserts a lot of meta data that is interfering with other people in the pipeline.
Is this possible through a PS script?
Not really as some schemas are read only.
This code will remove all that can be removed...
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript"); xmp = app.activeDocument.xmpMetadata.rawData; xmpObject = new XMPMeta(xmp); XMPUtils.removeProperties(xmpObject, "", "", XMPConst.REMOVE_ALL_PROPERTIES); app.activeDocument.xmpMetadata.rawData = xmpObject.serialize();
If you wanted to remove all data, you would have to export as Save for Web making sure no metadata is selected; or create a new document by selecting all layers and duplicate them to a new document. Do not just duplicate the document as this will retain the metadata.
Should note some are read-only to XMP. There are some apps like Exiftool that can remove much more metadata that Photoshop can. Exiftool can remove camera data for example while Photoshop can not.