通常复杂的PS文件导出时体积都非常大,通过一个简单脚本即可无压缩保存PS导出文件,体积缩小N倍 1.这是文件的尺寸,不大也不小
2.导出jpg可以看到,目前一张jpg差不多42 M
3.然后导入制作好的文件,通过脚本导入。导入后ps会卡顿一小会,等正常后文件就恢复正常了。(因为内容问题,所以我把内容覆盖掉了)
4.最后重新导出,可以看到文件已经非常小了,还不到1M
5.脚本文件内容: - 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();
用记事本粘贴以上代码后另存,后缀改为JSX,即(名字.jsx)后打开问题文件,文件-脚本-浏览-载入JSX格式文件即可。 |
电脑浏览网页时无法使用QQ快捷登录打开处理
给新入坑互联网开发小白的建议——服务器选