今天讓美工發(fā)我網(wǎng)站的源文件的時候,發(fā)現(xiàn)打開文件好卡c盤直接爆了,發(fā)現(xiàn)文件只有幾十Mps沒有破解文件,但是卡的跟幻燈片一樣,很奇怪,打開其他文件就不卡,在一篇文章上面看到的解決方法如下,問題就是原始數(shù)據(jù)搞的鬼
原始數(shù)據(jù)
ps原始數(shù)據(jù)
打開一個文件,點擊菜單欄的 【文件】→【文件簡介】
文件簡介
2.找到【原始數(shù)據(jù)】欄,有很多代碼。每次對文件的修改都會以數(shù)據(jù)的形式保存在這里,也就是修改的越多這里的數(shù)據(jù)也越多,數(shù)據(jù)一但過多就會變的很卡,然后我們可以選中這些數(shù)據(jù),但是完全刪不了,是的!直接選中是無法刪除的ps沒有破解文件,那么我們就需要通過其他方法來刪除了
刪除原始數(shù)據(jù)
制作腳本,看不懂代碼的直接無視第一步,文章結(jié)尾準備好了現(xiàn)成的,看第二步就好了腳本代碼
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();
復(fù)制
腳本運行
點擊載入,在保存一下那個卡頓的ps,就會發(fā)現(xiàn)內(nèi)存變小邊流暢了
腳本運行