当前位置:网站首页>Adobe-Photoshop(PS)-脚本开发-去除文件臃肿脚本
Adobe-Photoshop(PS)-脚本开发-去除文件臃肿脚本
2022-06-30 20:41:00 【插件开发】
1.算法程序
PS是使用非常广泛的图像处理软件,被广大设计师喜爱和熟悉。由于非常广泛的用途,而PS又不可能面面俱到,所有就有基于它的各种插件开发来扩展其功能,满足其特定专业的需要。本文介绍一种常用的脚本,将臃肿的PSD文件,去除臃肿。移除菜单文件->文件简介->原始数据,下图所示:
代码如下所示:
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("请先打开文档!")
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();
}
}
//运行文档移除标注
deleteDocumentAncestorsMetadata();
该脚本代码的主要功能是移除psd中臃肿的标记。
2.作者答疑
如有疑问,敬请留言。
边栏推荐
- 在线教育项目用户登录和注册
- docker安装mysql
- Study on lumiprobe modified triphosphate biotin-11-utp
- Evolution of screen display technology
- Peking University ACM problems 1000:a+b problem
- Gartner聚焦中国低代码发展 UniPro如何践行“差异化”
- Lambda expression principle analysis and learning (June 23, 2022)
- 二叉查找树(一) - 概念与C语言实现
- 大学生研究生毕业找工作,该选择哪个方向?
- 19.04 分配器
猜你喜欢

stacking集成模型预测回归问题

左值引用和右值引用

MySQL introduction, detailed installation steps and usage | dark horse programmer

MFC界面库BCGControlBar v33.0 - 桌面警报窗口、网格控件升级等

Lumiprobe protein quantitation - qudye Protein Quantitation Kit

修改已经上线的小程序名称

毕业设计

Amazon restricts LGBTQ related search and product sales in the United Arab Emirates

Lumiprobe 改性三磷酸盐丨生物素-11-UTP研究

On inline function
随机推荐
Peking University ACM problems 1003:hangover
大学生研究生毕业找工作,该选择哪个方向?
SQL必需掌握的100个重要知识点:创建和操纵表
MySQL introduction, detailed installation steps and usage | dark horse programmer
SQL Server 提取字符串中的纯数字
【微服务~Nacos】Nacos之配置中心
jfinal中如何使用过滤器监控Druid监听SQL执行?
ArcMap|用字段计算器对不同类别的id赋值
树基本概念
B_QuRT_User_Guide(31)
Software engineering UML drawing
哈夫曼树(一)基本概念与C语言实现
uniapp怎么上传二进制图片
左值引用和右值引用
股票开户优惠链接,我如何才能得到?另外,手机开户安全么?
Basic concepts of tree
Peking University ACM problems 1000:a+b problem
PM reports work like this, and the boss is willing to give you a raise
学习总结
报错FileSystemException: /datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file:结构需要清理