Photoshop CC - 如何清除PSD元數(shù)據(jù)(瘦身)

已測試Mac系統(tǒng)下可行

前言

我們把PSD另存為PNG/JPG文件的時候,一般來說,文件會小很多。
然而有的時候網(wǎng)絡(luò)上的一些PSD素材導(dǎo)出PNG/JPG時,竟然有好幾十mb。
這可能就需要我們清除PSD的元數(shù)據(jù),給PSD瘦瘦身,這樣另存為的時候,才不會有異常大的PNG/JPG出現(xiàn)。

那么如何清除PSD元數(shù)據(jù)呢?

方法1:使用JSX腳本。

  1. 將以下代碼復(fù)制并保存為.JSX文件(參考來源Adobe論壇)
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. 用Photoshop打開需要清除元數(shù)據(jù)的PSD
  2. Photoshop菜單里面選擇,文件-腳本-瀏覽,選中JSX文件,按確定。
  3. 保存PSD

方法2:使用Exiftool

Mac版示例

  1. 下載最新版文件并安裝 https://exiftool.org/
  2. Mac OS里面,打開Terminal, 輸入以下命令行:
    exiftool -r -overwrite_original -XMP-photoshop:DocumentAncestors= ‘需要清理的文件路徑’

希望這篇文章對你有幫助。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
禁止轉(zhuǎn)載,如需轉(zhuǎn)載請通過簡信或評論聯(lián)系作者。

友情鏈接更多精彩內(nèi)容