Answered
Javascript help - Export with pixel dimensions in filename
Hello;
I have found this script somewhere else and am needing some help.
It does the job, but when I am batch processing many images, the "Select Folder" dialog box always shows up; I cannot seem to bypass it or just have it save in the parent directory. Any help is appreciated; thanks!
var saveOptions = new JPEGSaveOptions( );
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 12; // image quality (0,12)
var w = app.activeDocument.width.toString().replace(' px', '');
var h = app.activeDocument.height.toString().replace(' px', '');
var file = new File(w + 'x' + h + '.jpg');
var filePath = file.saveDlg("Select Folder");
var saved = app.activeDocument.saveAs(filePath, saveOptions, true);