Copy link to clipboard
Copied
Hello!
I am an actor headshot photographer, and I format my headshots to have white borders and the actors name. I currently create a new 8x10 at 300DPI. I then use an action in Photoshop CC (latest version) that prompts me to open a jpg, then it resizes the headshot (the headshot itself is 4:6 aspect ratio) to leave a white border, and it adds my name at the bottom of the image. I go in and I change the name to my subject's name. I then export the final result. The final product looks like this:
I would like to automate this so that way I can select multiple images at a time, input the actor's name once, and have Photoshop spit out the files into a specified folder. Is this possible with a script, and if so, can anyone help me out with that? TIA!
Copy link to clipboard
Copied
Why would you want to have and automated process that requires human intervention to enter Names. You could easily add the name you want to the image files in some way like Filename or in the image's metadata info. The Automated process could then be fully automated and even batched. If all you need is a is a border around a single image a specific size and a name in the border it should be easy to automate.
Filenames, a simple frame template and a batch script could do it all.
The sample video does not show the File name stamp that could be done with my Script BatchOneImageCollage. In my
Photo Collage Toolkit
Photoshop scripting is powerful and I believe this package demonstrates this A video showing a 5 image collage PSD template being populated with images:
The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
There are fifteen scripts in this package they provide the following functions:
Copy link to clipboard
Copied
All you may need to do is name the Portrait files if your satisfied their composition and the images are portraits with aspect ratios near 2:3. and create the 8x10 300 DIP Photo collage template PSD that just need a White Background Layer and an Alpha Channel the maps the 4x6 Image location name "Image 1". That should require a few minuets to create with Photoshop most likely less then 5.
Copy link to clipboard
Copied
Am I able to have the text exactly like I have it in my example image? (same font, positioning, etc. I can send you the action) And is it possible to have the script not output PSD files?
Copy link to clipboard
Copied
We did something like that were I used to work. We used a script to automate formatting our images. I would suggest, as JJ, mentioned that you put the actor's name in the file's metadata - caption or description, for example. You can do a whole batch of images at one time, so not much typing. The the script runs and pulls the info from the metadata, adds the border, and saves as jpgs. Here's an example of what we were doing: company logo in the upper left, description - from metadata in the upper right, file name and date shot in the lower right, and a header.
Copy link to clipboard
Copied
Are you currently entering the actor's name as metadata? If not as metadata, what about the filename or folder name?
The "obvious/correct" place to enter this is in the IPTC Extension – Person Shown field
ExifTool:
XMP-iptcExt:PersonInImage
Adobe:
<Iptc4xmpExt:PersonInImage>
<rdf:Bag>
<rdf:li>Firstname Surname</rdf:li>
</rdf:Bag>
</Iptc4xmpExt:PersonInImage>
However, it may be "easier" to use the Subject/Keyword field or another more accessible field if the PersonInImage field proves hard to work with.
______________________________
EDIT: Off the top of my head, there are three possibilities so far –
1) Use/Adapt JJMack's BatchOneImageCollage script
2) Create a script to run your action and then process the action output using script functions that are not available to actions (i.e. variable metadata text)
3) Entirely recreate your action as a script so that there is no dependency for having the action loaded
Copy link to clipboard
Copied
You can invoke a script from within an action.
The script below formats the filename (removing the file extension), puts that into a new text layer, and sets the location and font formatting. You could modify it to read a metadata field or to accept input from a dialog box instead of using the filename.
--------------------------------
#target photoshop
testText();
function testText(){
if(documents.length > 0){
var originalDialogMode = app.displayDialogs;
app.displayDialogs = DialogModes.ERROR;
var originalRulerUnits = preferences.rulerUnits; //save previous ruler units
preferences.rulerUnits = Units.PIXELS;
try{
var docRef = activeDocument;
var LayerRef = docRef.artLayers.add(); //add a text layer
LayerRef.kind = LayerKind.TEXT;
var TextRef = LayerRef.textItem;
var fileNameNoExtension = docRef.name;
fileNameNoExtension = fileNameNoExtension.split('.');
if(fileNameNoExtension.length > 1){ //remove file extension
fileNameNoExtension.length--;
}
fileNameNoExtension = fileNameNoExtension.join('.');
TextRef.contents = fileNameNoExtension;
TextRef.position = new Array(80, 120); //location in pixels
preferences.rulerUnits = Units.POINTS;
TextRef.size = 96; //text formatting
TextRef.useAutoLeading = false;
TextRef.leading = 42;
TextRef.font = 'Calibri-Bold';
}
catch(e){
preferences.rulerUnits = originalRulerUnits;
app.displayDialogs = originalDialogMode;
return;
}
preferences.rulerUnits = originalRulerUnits;
app.displayDialogs = originalDialogMode;
}
else{
alert('You must have a document open to run this script.');
return;
}
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now