当前位置:网站首页>Adobe Photoshop (PS) - script development - remove file bloated script
Adobe Photoshop (PS) - script development - remove file bloated script
2022-06-30 20:57:00 【Plug in development】
List of articles
1. Algorithmic program
PS It is a widely used image processing software , Loved and familiar by designers . Because of its very wide range of uses , and PS It is impossible to cover everything , So there are various plug-in development based on it to extend its functions , Meet their specific professional needs . This article introduces a common script , Will be bloated PSD file , Remove bloated . Remove menu file -> File info -> Raw data , Shown below :
The code is as follows :
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(" Please open the document first !")
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();
}
}
// Run the document to remove annotations
deleteDocumentAncestorsMetadata();
The main function of this script code is to remove psd A bloated mark in .
2. Author Q & A
If you have any questions , Please leave a message .
边栏推荐
猜你喜欢
随机推荐
亚马逊在阿拉伯联合酋长国限制LGBTQ相关的搜索和产品销售
Go learning notes
防范未授权访问攻击的十项安全措施
Personal developed penetration testing tool Satania
C文件指针
PHP obtains opcode and C source code
MySQL:SQL概述及数据库系统介绍 | 黑马程序员
Markdown笔记简明教程
B_QuRT_User_Guide(35)
uniapp-路由uni-simple-router
有趣插件汇总
为什么vscode用久了电脑速度变慢?
偏向锁/轻量锁/重级锁锁锁更健康,上锁解锁到底是怎么完成实现的
两个skyline
Peking University ACM problems 1006:biorhythms
Gartner聚焦中国低代码发展 UniPro如何践行“差异化”
Adobe-Photoshop(PS)-脚本开发-去除文件臃肿脚本
凤凰架构——架构师的视角
ssh-server配置文件参数PermitRootLogin介绍
第81场双周赛









