Photography Forums  

Go Back   Photography Forums > Software > Photoshop Tutorials

How to add copyright notice in batch

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2003, 12:08 AM
Default How to add copyright notice in batch



Here's a Javascript I use to add copyright notices to my photos. You can
download
the scripting plug-in from Adobe, copy this script into a file in the
Scripts folder,
and run it on one image using File->Automate->Scripts. If you want to use it
more
than once, you can record an action to run the script. Then you can use
File->
Automate->Batch to run the action that runs the script on all the files in a
folder.

Of course, you should change the actual copyright notice to use your name.

// add white copyright notice at lower-left corner
// document must be in 8-bit mode, otherwise layers won't work
if ( documents.length > 0 )
{
var originalRulerUnits = preferences.rulerUnits;
var originalTypeUnits = preferences.typeUnits;
preferences.rulerUnits = Units.INCHES;
preferences.typeUnits = TypeUnits.POINTS;

try
{
var docRef = activeDocument;
var height = docRef.height;
var width = docRef.width;
var size = Math.sqrt(height * width) / 40;

// create a text layer at the front
var myLayerRef = docRef.artLayers.add();
myLayerRef.kind = LayerKind.TEXT;
// myLayerRef.opacity = 90;
myLayerRef.name = "Copyright";

// create a textItem
var myTextRef = myLayerRef.textItem;
myTextRef.contents = "© 1500 Leonardo da Vinci";
myTextRef.color.gray.gray = 100;
myTextRef.font = "Arial-BoldMT";
myTextRef.size = size * 72;

// position the text near the lower left corner
myTextRef.position = new Array( size, height-size);
}
catch( e )
{
preferences.rulerUnits = originalRulerUnits;
preferences.typeUnits = originalTypeUnits;
throw e;
}

preferences.rulerUnits = originalRulerUnits;
preferences.typeUnits = originalTypeUnits;
}
else
{
alert( "You must have a document open to add a copyright notice." );
}




Warren Sarle
Reply With Quote
  #2  
Old 06-29-2003, 01:58 AM
edjh
Guest
 
Posts: n/a
Default Re: How to add copyright notice in batch

Warren Sarle wrote:
> Here's a Javascript I use to add copyright notices to my photos. You can
> download

/snip/

Sounds neat but you can do this easily enough with an action. What's the
advantage?

--
Comic book sketches and artwork:
http://www.sover.net/~hannigan/edjh.html


Reply With Quote
  #3  
Old 06-29-2003, 07:52 AM
Warren Sarle
Guest
 
Posts: n/a
Default Re: How to add copyright notice in batch


"edjh" <(E-Mail Removed)> wrote in message
news:iHqLa.3122$(E-Mail Removed)...
> Warren Sarle wrote:
> > Here's a Javascript I use to add copyright notices to my photos. You can
> > download

> /snip/
>
> Sounds neat but you can do this easily enough with an action. What's the
> advantage?


I have never been able to get an action to add text at a percentage of the
image size. The script works on images of almost any size. Also, I find
it very awkward to edit actions, while you can edit scripts with any
text editor. But if you're more skilled with actions than I am, you might
well prefer to use actions.


Reply With Quote
  #4  
Old 06-29-2003, 12:32 PM
edjh
Guest
 
Posts: n/a
Default Re: How to add copyright notice in batch

Warren Sarle wrote:
> "edjh" <(E-Mail Removed)> wrote in message
> news:iHqLa.3122$(E-Mail Removed)...
>
>>Warren Sarle wrote:
>>
>>>Here's a Javascript I use to add copyright notices to my photos. You can
>>>download

>>
>>/snip/
>>
>>Sounds neat but you can do this easily enough with an action. What's the
>>advantage?

>
>
> I have never been able to get an action to add text at a percentage of the
> image size. The script works on images of almost any size. Also, I find
> it very awkward to edit actions, while you can edit scripts with any
> text editor. But if you're more skilled with actions than I am, you might
> well prefer to use actions.
>
>

Okay. Good points.

--
Comic book sketches and artwork:
http://www.sover.net/~hannigan/edjh.html


Reply With Quote
Reply

Tags
add, batch, copyright, notice

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 01:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.