当前位置:网站首页>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.作者答疑
如有疑问,敬请留言。
边栏推荐
猜你喜欢
Is the project manager a leader? Can you criticize and blame members?
Binary search tree (1) - concept and C language implementation
[1175. prime number arrangement]
Lumiprobe nucleic acid quantitative qudye dsDNA br detection kit
B_QuRT_User_Guide(33)
谈谈内联函数
B_QuRT_User_Guide(32)
Vite2兼容低版本chrome(如搜狗80),通过polyfills处理部分需求高版本的语法
二叉查找树(一) - 概念与C语言实现
1. Introduction to generating countermeasures network
随机推荐
SQL必需掌握的100个重要知识点:创建和操纵表
二叉查找树(一) - 概念与C语言实现
B_QuRT_User_Guide(34)
第81场双周赛
Comparison between QT and other GUI Libraries
Lumiprobe蛋白质定量丨QuDye 蛋白定量试剂盒
毕业五年,想当初若没有入行测试,我是否还会如这般焦虑
北京大学ACM Problems 1005:I Think I Need a Houseboat
多表操作-外键约束
SQL Server 提取字符串中的纯数字
毕业设计
亚马逊在阿拉伯联合酋长国限制LGBTQ相关的搜索和产品销售
Go语学习笔记 - gorm使用 - 数据库配置、表新增 | Web框架Gin(七)
谈谈内联函数
有趣插件汇总
B_QuRT_User_Guide(32)
C文件指针
vncserver: Failed command ‘/etc/X11/Xvnc-session‘: 256!
报错:Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
Peking University ACM problems 1006:biorhythms