admin 管理员组文章数量: 1086019
Photoshop怎么去掉元数据?
有一些PSD文件,明明图片宽高像素不大,文件却很大,使用photoshop软件编辑时电脑“卡渣飞”了,查看元数据后发现元数据很多,这些元数据就是“元凶”,那么如何去掉元数据呢?
- 将下面这段代码复制粘贴到文本工具当中,另存为后缀名为Jsx 格式文件,比如“PSD瘦身.jsx”。
- 然后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( 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();
版权声明:本文标题:PS删除去掉元数据 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1738339445a1966456.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论