Caption maker?

Chaz Photos

Jack Elam
Suspended / Banned
Messages
6,283
Name
Chaz
Edit My Images
Yes
I need a caption maker that will take the file name and the authors name and ad this to a border to photos any one know of one?
I use to have the Russell Brown that worked in CS4 Bridge but as I have a new PC I have not loaded it and the Web site has been hacked and can not get it
Have you a copy of this script or know of what I can do
I need to do a large batch of photos
Thank
 
Here is a very basic script that should get you started..
Code:
//TEXT works best @ 72 PPI
if(documents.length){
app.activeDocument.suspendHistory('Watermark', 'main()'); 
}
function main(){
app.displayDialogs = DialogModes.NO;
/////////////////////////////// Alter to suit ////////////////////////
var FontName = "Arial"; //Must be postscript  name of font!
var FontSize = 14;
var BorderWidth = 8;
var BorderBottom = 25; //This is additional to the BorderWidth!
//////////////////////////////////////////////////////////////////
var black = new SolidColor(); 
black.rgb.hexValue = '000000'; 
var white = new SolidColor(); 
white.rgb.hexValue = 'ffffff'; 
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
///////////// Alter to suit ////////////////////////
fitImage(600,72); //Longest size in pixels
////////////////////////////////////////////////////////////////////////////
activeDocument.flatten();
app.backgroundColor = white;
app.activeDocument.resizeCanvas(activeDocument.width.value + 2, activeDocument.height.value +2, AnchorPosition.MIDDLECENTER);
app.backgroundColor = black;
app.activeDocument.resizeCanvas(activeDocument.width.value + (BorderWidth*2), activeDocument.height.value +( BorderWidth*2), AnchorPosition.MIDDLECENTER);
app.activeDocument.resizeCanvas(activeDocument.width.value, activeDocument.height.value + BorderBottom, AnchorPosition.TOPCENTER);
var newTextLayer = activeDocument.artLayers.add(); 
newTextLayer.kind = LayerKind.TEXT; 
newTextLayer.textItem.kind = TextType.POINTTEXT
newTextLayer.textItem.color = white; 
newTextLayer.textItem.font = FontName;
newTextLayer.textItem.size = FontSize; 
var Author = activeDocument.info.author;
///////////// Alter to suit ////////////////////////
if (Author == '') Author = "Your Name Goes Here";
////////////////////////////////////////////////////////////////////////////
var Name = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, '');
newTextLayer.textItem.contents =Name + " - " + Author;
newTextLayer.textItem.kind = TextType.PARAGRAPHTEXT; 
newTextLayer.textItem.height = FontSize+15;
newTextLayer.textItem.width = activeDocument.width.value-(BorderWidth*2);
newTextLayer.textItem.position = Array(BorderWidth, activeDocument.height.value - (BorderBottom)); 
newTextLayer.textItem.justification=Justification.CENTERJUSTIFIED; 
activeDocument.flatten();
activeDocument.selection.selectAll();
activeDocument.selection.stroke(white, 1, StrokeLocation.INSIDE);
activeDocument.selection.deselect();
app.preferences.rulerUnits = startRulerUnits;
}
function fitImage(newImgSize,res) { 
	var doc = app.activeDocument;
	if (res == undefined) res = undefined;
      if (doc.width > doc.height) { 
         doc.resizeImage(new UnitValue(newImgSize,'px'), undefined, res, ResampleMethod.BICUBIC);
         } else
      if (doc.width < doc.height) { 
         doc.resizeImage(undefined, new UnitValue(newImgSize,'px'), res, ResampleMethod.BICUBIC);
         } else
      if (doc.width == doc.height) { 
         doc.resizeImage(new UnitValue(newImgSize,'px'), new UnitValue(newImgSize,'px'), res, ResampleMethod.BICUBIC); 
         } 
};
 
You need to search out Cowasaki and his scriptwriter prog on this forum somewhere. Haven't tried it myself but I think it will do what you want.
 
Back
Top