怎么处理PS文件保存后特别大,打卡比较卡的问题?
当您发现PS文件保存后特别的大,很不正常,几个图层的文件就达到了150M左右的时候,当您发现PS文件打开也是特别的慢的时候,不访试下以下代码,只需执行一下,文件大小瞬间从150M减到2M左右。
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();操作步骤:
(1)把代码复制记事本,并保存为jsx文件。
(2)复制jsx文件到PS\Presets\Scripts下面。
(3)打开文件,在脚本中找到“清除占空间冗余”并执行。
