PS删除去掉元数据
Photoshop怎么去掉元数据?
七夕单身
古巨基婚纱照有⼀些PSD⽂件,明明图⽚宽⾼像素不⼤,⽂件却很⼤,使⽤photoshop软件编辑时电脑“卡渣飞”了,查看元数据后发现元数据很多,这些元数据就是“元凶”,那么如何去掉元数据呢?
1. 将下⾯这段代码复制粘贴到⽂本⼯具当中,另存为后缀名为Jsx 格式⽂件,⽐如“PSD瘦⾝.jsx”。
2. 然后PS打开有元数据的PSD⽂件,执⾏「 ⽂件」——「 脚本」——「 浏览…」,选择保存的 Jsx 格式⽂件“PSD瘦⾝.jsx”,即可
解决该问题。
代码如下:
林弯弯整容
function deleteDocumentAncestorsMetadata(){
//String version of the app name
whatApp =String(app.name);
// Check for photoshop specifically, or this will cause errors立夏吃什么传统美食
胡歌整容前后对比
if(whatApp.search("Photoshop")>0){
// Function Scrubs Document Ancestors from Files
if(!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( pMetadata.rawData);
// Begone foul Document Ancestors!
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP,"DocumentAncestors");
罗志祥王心凌
pMetadata.rawData = xmp.serialize();
}
}
// Now run the function to remove the document ancestors
deleteDocumentAncestorsMetadata();