保存技巧,解決PSD文件導(dǎo)出過大的問題

2022-12-26 17:52:54 來源/作者: / 己有:226人學(xué)習(xí)過

使用Photoshop設(shè)計(jì)圖片時(shí),會因?yàn)槭褂脠D片、引用智能對象、圖層問題造成儲存的PSD文件過大,解決辦法我也找了一段時(shí)間,在百度偶然看見解決辦法,親測有效,附件中是我存好的JSX文件,可以下載使用,第一次嘗試解決,務(wù)必做好備份

使用方法:將下面這段代碼復(fù)制粘貼到文本工具當(dāng)中,另存為 Jsx 格式文件。再 PS 打開有問題的文檔,「 文件」——「 腳本」——「 瀏覽...」選擇保存的 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 s cript.")
return;
}
if (ExternalObject.AdobeXMPs cript == undefined) ExternalObject.AdobeXMPs cript = new ExternalObject("lib:AdobeXMPs cript");
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();

如果復(fù)制以上文件無效,可以下載我存好的JSX文件 或者去原百度貼吧地址復(fù)制

原始地址: https://img.lvups.com/d/file/bigpic/2022/12/26/dd00bppm2e1

保存技巧,解決PSD文件導(dǎo)出過大的問題

感謝百度上面的dowson2002 大神