Copy link to clipboard
Copied
I think this was the script....
#target Photoshop
app.bringToFront;
var inFolder = Folder.selectDialog("Please select folder to process");
if (inFolder != null) {
var fileList = inFolder.getFiles(/\.(jpg|tif|psd|)$/i);
var outfolder = new Folder(decodeURI(inFolder) + "/Edited");
if (outfolder.exists == false) outfolder.create();
for(var a = 0; a < fileList.length; a++) {
if (fileList[a] instanceof File) {
var doc = open(fileList[a]);
doc.flatten();
var docname = doc.name.slice(0
...
Copy link to clipboard
Copied
Have a look here..
http://www.adobeforums.com/webx/.59b7368d/5
Copy link to clipboard
Copied
Hi Paul, looking for the article from the link you posted (http://www.adobeforums.com/webx/.59b7368d/5)
but it takes me to the forum home page (http://forums.adobe.com/index.jspa)
Could you give me some keywords or the topic so I can find it?
Copy link to clipboard
Copied
I think this was the script....
#target Photoshop
app.bringToFront;
var inFolder = Folder.selectDialog("Please select folder to process");
if (inFolder != null) {
var fileList = inFolder.getFiles(/\.(jpg|tif|psd|)$/i);
var outfolder = new Folder(decodeURI(inFolder) + "/Edited");
if (outfolder.exists == false) outfolder.create();
for(var a = 0; a < fileList.length; a++) {
if (fileList[a] instanceof File) {
var doc = open(fileList[a]);
doc.flatten();
var docname = doc.name.slice(0, -4);
CropStraighten();
doc.close(SaveOptions.DONOTSAVECHANGES);
var count = 1;
while(app.documents.length) {
var saveFile = new File(decodeURI(outfolder) + "/" + docname + "#" + zeroPad(count, 3) + ".jpg");
SaveJPEG(saveFile, 12);
activeDocument.close(SaveOptions.DONOTSAVECHANGES) ;
count++;
}
}
}
};
function CropStraighten() {
executeAction( stringIDToTypeID('CropPhotosAuto0001'), undefined, DialogModes.NO );
};
function SaveJPEG(saveFile, jpegQuality) {
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality;
activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
};
function zeroPad(n, s) {
n = n.toString();
while(n.length < s) n = '0' + n;
return n;
};
Copy link to clipboard
Copied
Thank you, thank you, thank you.
You just saved me about 90 minutes worth of work by reposting this script. I followed your directions and I'm now watching Photoshop fly through a batch crop and straighten process for about 60 "gang scanned" images.
I really appreciate the help.
Cheers,
AJ
Copy link to clipboard
Copied
I do not know why this append is here in an old thread on batch crop and straightening images for baseball cards. If this append has anything to do with something like a composit thing a baseball card, mag cover etc. An other way to address the problem is to batch populate a Photo Collage Template that will auto size and place in images into a template and leave the populated collage as a PSD file so that it can be tweaked. ie Straighten image add anotation change position etc. My Photoshop Photo Collage Toolkit is designed to do just that. In fact is comes with a sample Baseball Template and Mag Cover template. The sample Basball Template has many groups and hidden layers that let you change things like Logos, Frame, Field position etc. Example: Babe Ruth Card.jpg and JJMackTime.jpg
Documentation and download: Free Photoshop Photo Collage and Mockup Toolkit
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Script on GitHub. Save script in text editor as .jsx file.
Do not place .jsx file in folder with "RUN" scanned photos.
Do NOT place "OUTPUT" folder in folder with RUN scanned photos.
Open Photoshop
Go to FILE / SCRIPTS / BROWSE
Select the .jsx file.
You will see popup boxes with instructions in small print at op of box instructing you to make selections.
Wait and watch for the magic to happen.
Copy link to clipboard
Copied
Perfect.
Only nitpick - the recursion just document that the output folder should not be a sub-folder of the source - otherwise you get in a recursive loop.
My project went from weeks to days with this i think.
Truly, truly appreciated.