PS删除去掉元数据
Photoshop怎么去掉元數據?
有一些PSD文件,明明圖片寬高像素不大,文件卻很大,使用photoshop軟件編輯時電腦“卡渣飛”了,查看元數據后發現元數據很多,這些元數據就是“元兇”,那么如何去掉元數據呢?
代碼如下:
function deleteDocumentAncestorsMetadata() {//String version of the app namewhatApp = String(app.name);// Check for photoshop specifically, or this will cause errorsif(whatApp.search("Photoshop") > 0) { // Function Scrubs Document Ancestors from Filesif(!documents.length) {alert("There are no open documents. Please open a file to run this script.")return;}if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);// Begone foul Document Ancestors!xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");app.activeDocument.xmpMetadata.rawData = xmp.serialize();}} // Now run the function to remove the document ancestors deleteDocumentAncestorsMetadata();總結
 
                            
                        - 上一篇: M2Det 网络解读
- 下一篇: 最新php在线扒站程序源码分享
