当前位置:网站首页>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.作者答疑
如有疑问,敬请留言。
边栏推荐
- Software engineering UML drawing
- PHP获取Opcode及C源码
- Evolution of screen display technology
- 左值引用和右值引用
- uniapp-路由uni-simple-router
- PM reports work like this, and the boss is willing to give you a raise
- 19.04 分配器
- qiao-npms:搜索npm包
- Analysis of breakpoint continuation and download principle
- 基于开源流批一体数据同步引擎ChunJun数据还原—DDL解析模块的实战分享
猜你喜欢

PHP obtains opcode and C source code

Lumiprobe染料 NHS 酯丨BDP FL NHS 酯研究

stacking集成模型预测回归问题

报错:Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.

1. Introduction to generating countermeasures network
![Halcon knowledge: check the measurement objects [1]](/img/0a/3a12e281fcb201d8d11b25dac4145a.png)
Halcon knowledge: check the measurement objects [1]

AVL平衡二叉树(一) - 概念与C语言实现

Qiao NPMS: search for NPM packages

软工UML画图

All the important spark summit features were released here last night (with ultra clear video attached)
随机推荐
Document contains & conditional competition
居家办公没有“血泪史”| 社区征文
Web APIs 综合案例-Tab栏切换 丨黑马程序员
在线教育项目用户登录和注册
On the charm of code language
SqlServer 获取字符串中数字,中文及字符部分数据
SQL Server 提取字符串中的纯数字
Testing principle and precautions of biovendor rage ELISA Kit
Lumiprobe 聚乙二醇化和 PEG 接头丨碘-PEG3-酸研究
A complete collection of vulnerability scanning tools. Mom doesn't have to worry that I won't find any more vulnerabilities
Study on lumiprobe dye NHS ester BDP FL NHS ester
Lumiprobe 改性三磷酸盐丨生物素-11-UTP研究
Peking University ACM problems 1002:487-3279
北京大学ACM Problems 1005:I Think I Need a Houseboat
Encoding type of Perl conversion file
The newly born robot dog can walk by himself after rolling for an hour. The latest achievement of Wu Enda's first disciple
AVL平衡二叉树(一) - 概念与C语言实现
在手机炒股开户安全吗?
北京大学ACM Problems 1001:Exponentiation
CentOS - enable / disable Oracle