Imprinting file name in corner of image

TH
Posted By
tim_hodges
Aug 10, 2004
Views
479
Replies
3
Status
Closed
Hi
I am trying to produce a set of images with the relevant file name and my copyright details in the corner of each print. I have tried to do this as an action incorporating picture package but cannot get the image to save and close in a new folder with a modified file reference. eg Image XYZ123.jpg becomes XYZ123a.jpg.
Has anybody any ideas how to achieve this as a batch process with approx 300 images? Rgds
Tim

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Y
YrbkMgr
Aug 10, 2004
Create a Save As… action. Toggle the dialog to OFF. Have your action that performs the "editing" call the Save As… action as a last step.

Use File|Automate|Batch. In the dialog, you can specify file naming conventions as well as pick source and destination folders.

Peace,
Tony
LH
Lawrence_Hudetz
Aug 10, 2004
Since I would assume "relevant" here means each image has unique names, can batch accomodate that? It would have to stop at each image to allow the name to be entered.
JB
Jonathan_Balza
Aug 10, 2004
Well, you could definitely use scripting. I have this script lying around that does pretty much exactly that. 2 things:

* I did not write this script, and I don’t remember who did, so credit to whoever wrote this. I did modify it from the original, if I remember correctly.
* You may have to adjust the script depending on what corner you want it in, etc… I would have done it for you, but you didn’t mention what corner you needed.

Here it is:

————————-
if ( documents.length > 0 )
{
/*
This script will add copyright information and filename on a text layer */
// set units to pixels
var originalRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;

try
{
// add art layer
var docRef = activeDocument;
var artLayerRef = docRef.artLayers.add();
artLayerRef.kind = LayerKind.TEXT;

// ============= Personalize your values in the section below ============ // Copyright info
var myCopyrightText = "© ? 2004 – file: ";
// select opacity
artLayerRef.opacity = 100;
// select the text colour
var newColour = new SolidColor();
if (docRef.mode == DocumentMode.CMYK)
{
newColour.cmyk.cyan = 255;
newColour.cmyk.magenta = 255;
newColour.cmyk.yellow = 255;
newColour.cmyk.black = 0;
}
if (docRef.mode == DocumentMode.RGB)
{
newColour.rgb.red = 255;
newColour.rgb.green = 255;
newColour.rgb.blue = 255;
}
artLayerRef.textItem.color = newColour;
// select the font name
artLayerRef.textItem.font = "ArialMT";
// select the font size
artLayerRef.textItem.size = 10;
// select the text position – this can be an absolute value too, eg. (10,20) artLayerRef.textItem.position = new Array(docRef.width / 2, docRef.height *0.05); // select the text justification
artLayerRef.textItem.justification = Justification.CENTER; // ============= Personalize your values in the section above ============

// add text item on the art layer
var textItemRef = artLayerRef.textItem;
// text contents is copyright info + filename
myCopyrightText = myCopyrightText + docRef.name;

textItemRef.contents = myCopyrightText;

// dereference pointers
docRef = null;
artLayerRef = null;
textItemRef = null;
myCopyrightText = null;
newColour = null;
}
catch( e )
{
// received and error … throw it back to the user
preferences.rulerUnits = originalRulerUnits;
throw e;
}
preferences.rulerUnits = originalRulerUnits;
}
else
{
alert( "Open a document first." );
}
————————-

Just copy and paste the text between the dashed lines into notepad, and save it as a .js file into the "C:\Program Files\Adobe\Adobe Photoshop CS\Presets\Scripts" directory. Then restart Photoshop, and run the file from "File-Scripts".

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections