hi
can anyone assist in a script that can automate rescaling pictures to smaller sizes and at the same time converting from rgb to cmyk, NOTE: all pictures are within sub folder hierarchies on mac osx
thanks
script to batch resize, convert to CMYK within sub folders
-
pfaffenbichler
script to batch resize, convert to CMYK within sub folders
This should help with the first step, getting the files from folders in a folder.
As for the rest of the stuff how well versed are you with JavaScript and Photoshop’s DOM and have you done a Forum search here and over at
https://forums.adobe.com/community/phot ... ng/content ... ng/content
for the various operations you want to combine?
Code: Select allvar theFolder = Folder.selectDialog ("select folder");
var theFolderFiles = retrieveTIFandPSD (theFolder, []) ;
alert (theFolderFiles.length+"\n\n"+theFolderFiles.join("\r"));
////// get from subfolders //////
function retrieveTIFandPSD (theFolder, theFiles) {
if (!theFiles) {var theFiles = []};
var theContent = theFolder.getFiles();
for (var n = 0; n < theContent.length; n++) {
var theObject = theContent[n];
if (theObject.constructor.name == "Folder") {
theFiles = retrieveTIFandPSD(theObject, theFiles)
};
if (theObject.name.slice(-4) == ".tif" || theObject.name.slice(-4) == ".psd") {
theFiles = theFiles.concat(theObject)
}
};
return theFiles
};
As for the rest of the stuff how well versed are you with JavaScript and Photoshop’s DOM and have you done a Forum search here and over at
https://forums.adobe.com/community/phot ... ng/content ... ng/content
for the various operations you want to combine?
Code: Select allvar theFolder = Folder.selectDialog ("select folder");
var theFolderFiles = retrieveTIFandPSD (theFolder, []) ;
alert (theFolderFiles.length+"\n\n"+theFolderFiles.join("\r"));
////// get from subfolders //////
function retrieveTIFandPSD (theFolder, theFiles) {
if (!theFiles) {var theFiles = []};
var theContent = theFolder.getFiles();
for (var n = 0; n < theContent.length; n++) {
var theObject = theContent[n];
if (theObject.constructor.name == "Folder") {
theFiles = retrieveTIFandPSD(theObject, theFiles)
};
if (theObject.name.slice(-4) == ".tif" || theObject.name.slice(-4) == ".psd") {
theFiles = theFiles.concat(theObject)
}
};
return theFiles
};