文章目录[隐藏]
方法/步骤2
-
现在动手解决这个问题:首先我们将下面一段代码复制到记事本中,存储为“jpg_mini.jsx”文档,并将文档存储到方便调用的地方,我是放在桌面上。
-
这是代码:function deleteDocumentAncestorsMetadata() { whatApp = String(app.name);//String version of the app name if(whatApp.search(“Photoshop”) > 0) { //Check for photoshop specifically, or this will cause errors //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,在存储JPG文档之前,先执行上面一段代码,具体操作为:”文件 –> 脚本 –> 浏览“
-
找到刚才建立的“jpg_mini.jsx”文档并打开执行。
-
稍等运行完毕之后(没有任何提示的),再存储JPG格式,这时候文档大幅度缩小,正常了。
-
存储完毕之后我们查看文件属性,发现确实OK了,文档质量和图片大小都很正常,一切正常了!