Saving all images in Photoshop
· Filed in coding
One thing I hate about Photoshop is the lack of a Save All option. It might well be the only thing I hate about it, really.
Picture yourself coming from a photo-shooting session, you have 4GB of RAW files to edit. Would you also want to save one by one? Think not.
So, as we all know, Photoshop is a great application and compensates that supporting event-based scripts in several languages (Javascript, VBScript and AppleScript). These scripts will tell Photoshop what to do, automatically. You just have to press the button.
I've searched around and found this interesting topic on kirupa.com
For the sake of this article I'll post the code for the Save All action:
var tempFolder = new Folder ("C:/Your_Temporary_Folder")
tempFolder.create();
var DL = documents.length;
for(a=1;a<=DL;a++){
activeDocument = documents[a-1];
var AD=activeDocument;
var imgName= AD.name;
imgName = imgName.substr(0, imgName.length -4);
AD.flatten();
saveFile = new File("C:/Your_Temporary_Folder/"+imgName+".jpg");
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 12;
AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
}
Save it with a .js extension and open it on Photoshop (Menu File > Scripts). This example saves JPEG files with level 12 compression; you might want to change the output quality or the format itself.
This code was written by mlk (mlkdesign -at -online.fr) with a few changes by me.
You can download the original one here.
You also might want to check other useful scripts:
- Retrieving and Displaying Exif Data from a Photo
- Saving your layers as separate documents
- Comparing the Saving Qualities of JPGs
Kudos to Tab Mix Plus extension for Firefox which allowed me to recover this post :)
Home
Subscribe to this blog
11 Responses to "Saving all images in Photoshop"