|
|||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
"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. |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Tags |
| add, batch, copyright, notice |
| Thread Tools | |
| Display Modes | |
|
|