当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Wechat applet development practice cloud music

ICLR'22 Spotlight | 怎样度量神经网络权重中的信息量?

科研中遇到迷茫困惑如何向前一步?如何在科研中发挥女性优势?

Web APIs 综合案例-Tab栏切换 丨黑马程序员

MySQL:SQL概述及数据库系统介绍 | 黑马程序员

Lumiprobe biotin phosphimide (hydroxyproline) instructions
![[1175. prime number arrangement]](/img/f2/d427db03da151786ea1dfb7a76328a.png)
[1175. prime number arrangement]

片荒吗?不用下载直接在线免费看的资源来了!2022年收藏夹必须有它!

Personal developed penetration testing tool Satania

DM8:生成DM AWR报告
随机推荐
Lumiprobe细胞生物学丨DiA,亲脂性示踪剂说明书
双立体柱状图/双y轴
MySQL:SQL概述及数据库系统介绍 | 黑马程序员
uniapp-第三方网络请求
遇到“word在试图打开文件时遇到错误”怎么办?
Peking University ACM problems 1004:financial management
片荒吗?不用下载直接在线免费看的资源来了!2022年收藏夹必须有它!
MFC界面库BCGControlBar v33.0 - 桌面警报窗口、网格控件升级等
三个火枪手
AVL平衡二叉树(一) - 概念与C语言实现
MySQL advanced 3
数据库 OLAP、OLTP是什么?相同和不同?适用场景
B_QuRT_User_Guide(32)
Lumiprobe biotin phosphimide (hydroxyproline) instructions
PHP获取Opcode及C源码
二叉查找树(一) - 概念与C语言实现
docker安装mysql
Lvalue reference and lvalue reference
毕业设计
DM8:生成DM AWR报告