如何解决photoshop - 以多种 jpeg 质量或文件格式同时导出文件
在 photoshop 中,我需要以 100% 和 10% 的比例导出文件。有没有一种简单的方法可以一次性完成,而不必执行两次?谢谢
解决方法
假设您在谈论 jpeg 质量。
稍加挖掘,您就可以找到一个 function to save as an image as jpg。
// Path to the two images,named appropriately
// NOTE change to suit your needs
var myFileA = "C:\\myfolder\\myjpeg_high_quality.jpg";
var myFileB = "C:\\myfolder\\myjpeg_low_quality.jpg";
// Jpeg quality used to be from 1-10 in the old days.
// Now it's from 1-12,Let's save out the best and the worst.
jpeg_it(myFileA,12);
jpeg_it(myFileB,1);
// function JPEG IT (file path + file name,quality)
// ----------------------------------------------------------------
function jpeg_it(filePath,jpgQuality)
{
if(! jpgQuality) jpgQuality = 12;
// jpg file options
var jpgFile = new File(filePath);
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.formatOptions = FormatOptions.OPTIMIZEDBASELINE;
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpgQuality;
activeDocument.saveAs(jpgFile,jpgSaveOptions,true,Extension.LOWERCASE);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。