当前位置: 首页 > news >正文

山东网站建设流程学生登录注册入口

山东网站建设流程,学生登录注册入口,商业活动的网站建设,做网站维护有前途吗原因:美术提交大量2048x2048的贴图,导致工程臃肿。 方案:使用photoshop的javascript脚本批量把指定的文件夹以及所有子文件夹的贴图进行压缩。 脚本中指定针对2048x2048的贴图进行处理。 // Photoshop JavaScript to resize TGA images with…

原因:美术提交大量2048x2048的贴图,导致工程臃肿。

方案:使用photoshop的javascript脚本批量把指定的文件夹以及所有子文件夹的贴图进行压缩。

           脚本中指定针对2048x2048的贴图进行处理。

// Photoshop JavaScript to resize TGA images with specific resolution
// and process all subfolders// Change the folder path to the folder containing your TGA images
var inputFolder = Folder.selectDialog("Select the root folder containing TGA images");// The target resolution
var targetWidth = 2048;
var targetHeight = 2048;// The new size (change these values to what you need)
var newWidth = 1024;
var newHeight = 1024;// Function to recursively process a folder
function processFolder(folder) {var files = folder.getFiles();for (var i = 0; i < files.length; i++) {var file = files[i];if (file instanceof Folder) {// Call the function recursively if it's a folderprocessFolder(file);} else if (file instanceof File && file.name.match(/\.(tga)$/i)) {// Process TGA filesvar doc = open(file);// Check if the image resolution matches the target resolutionif (doc.width == targetWidth && doc.height == targetHeight) {// Resize the imagedoc.resizeImage(UnitValue(newWidth,"px"), UnitValue(newHeight,"px"), null, ResampleMethod.BICUBIC);// Save the document in TGA formatvar saveOptions = new TargaSaveOptions();saveOptions.resolution = TargaBitsPerPixels.THIRTYTWO; // or choose EIGHT, SIXTEEN, or TWENTYFOURsaveOptions.alphaChannels = true; // Set to false if you don't need alpha channels// Save and close the documentdoc.saveAs(file, saveOptions, true, Extension.LOWERCASE);doc.close(SaveOptions.DONOTSAVECHANGES);} else {// Close the document without savingdoc.close(SaveOptions.DONOTSAVECHANGES);}}}
}// Run the function if a folder was selected
if (inputFolder) {processFolder(inputFolder);alert("Processing complete!");
}

请按照以下步骤使用此脚本:

  1. 打开文本编辑器,如Notepad或TextEdit。
  2. 将上述代码复制并粘贴到文本编辑器中。
  3. 根据您的需求,修改newWidth和newHeight变量来设置新的尺寸。
  4. 将文件保存为扩展名为.jsx的文件,例如resizeTGA.jsx。
  5. 打开Photoshop。
  6. 选择“文件” > “脚本” > “浏览”并选择您保存的.jsx文件来运行脚本。

确保在运行脚本之前备份您的图片。此外,根据您的Photoshop版本和设置,您可能需要在Photoshop的“首选项”中启用“允许脚本操作”选项。

http://www.yayakq.cn/news/841951/

相关文章:

  • excel可以做网站吗seo方法
  • 优秀网站ui设计桂林微信网站
  • 腾讯云做淘客网站丹东吧
  • 女式包包网站建设定位株洲专业网站建设
  • c 做注册网站乌兰察布市建设局网站
  • 郑州做网站找哪家深圳最大的公司排名
  • 银川网站设计公司佛山网上办事大厅官网
  • app扁平化设计网站模板正品购物网站排行
  • 常州中小企业网站制作wordpress获取用户名密码
  • 昆明网站seo服务wordpress导购页面
  • 做seo网站的步骤深圳网站设计公司在什么地方
  • 快站公众号工具有哪些设计网站app
  • 网站辅助导航做网站加盟
  • 网站描述标签怎么写商场网站模板
  • 网站源码免费的兰州城建设计院网站
  • php网站建设教程若要使用链接目标在新窗口打开
  • 中文字体设计网站wordpress熊掌号资源提交
  • 网站页脚优化怎么做网页设计尺寸pc端
  • 网站建设目标的技术可行性中国企业网控股有限公司
  • 平面设计网站导航做网站的软件初中生
  • 买服务器的网站做个视频网站
  • 网站系统架构设计建材 东莞网站建设
  • 西安哪家公司网站做的好国际新闻最新消息今天核废水
  • 桂林 网站 制作住房和城市建设部网站
  • 长宁区网站制网站设计有哪些语言版本
  • 什么是网站开发流程蜘蛛不抓取网站的原因
  • 阳泉市编办网站三基建设网站上设置多语言怎么做
  • wordpress 电影站主题深圳专业高端网站建设
  • 建设vip视频解析网站违法吗西安有哪些做网站的公司好
  • 设置网站电商网站设计页面设计