当前位置:网站首页>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.作者答疑
如有疑问,敬请留言。
边栏推荐
- centos——开启/关闭oracle
- The newly born robot dog can walk by himself after rolling for an hour. The latest achievement of Wu Enda's first disciple
- MySQL introduction, detailed installation steps and usage | dark horse programmer
- AVL balanced binary tree (I) - concept and C language implementation
- 有趣插件汇总
- Peking University ACM problems 1005:i think I need a houseboat
- jfinal中如何使用过滤器监控Druid监听SQL执行?
- B_QuRT_User_Guide(31)
- Go learning notes
- 19.04 分配器
猜你喜欢

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

STL的基本组成部分

Lumiprobe cell biology - dia, instructions for lipophilic tracer

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

Software engineering UML drawing

A complete collection of vulnerability scanning tools. Mom doesn't have to worry that I won't find any more vulnerabilities

BioVendor sRAGE Elisa试剂盒测试原理和注意事项

微信小程序怎么实现圆心进度条

Implementation principle of PostgreSQL heap table storage engine
![翻转链表II[翻转链表3种方式+dummyHead/头插法/尾插法]](/img/a8/6472e2051a295f5e42a88d64199517.png)
翻转链表II[翻转链表3种方式+dummyHead/头插法/尾插法]
随机推荐
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
Go学习笔记
请问海量数据如何去取最大的K个
Lumiprobe核酸定量丨QuDye dsDNA BR 检测试剂盒
MySQL简介、详细安装步骤及使用 | 黑马程序员
[1175. prime number arrangement]
PHP obtains opcode and C source code
报错:Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
Common questions and answering skills of project manager interview
北京大学ACM Problems 1001:Exponentiation
Amazon restricts LGBTQ related search and product sales in the United Arab Emirates
Lumiprobe protein quantitation - qudye Protein Quantitation Kit
Peking University ACM problems 1001:exposition
北京大学ACM Problems 1003:Hangover
Qiao NPMS: search for NPM packages
二叉查找树(一) - 概念与C语言实现
为什么vscode用久了电脑速度变慢?
uniapp-第三方网络请求
1. Introduction to generating countermeasures network
Lingyun going to sea | 10 leap &huawei cloud: jointly helping Africa with inclusive financial services