Photoshop Script for Border (with Exif data)

Status
Not open for further replies.
Right new version 1.0.4

New option allowed to force script NOT to resize the image.
Correction of a remark
Filename layer name named as per the filename rather than "Filename"

// Picture size

var PictureWidth = 0; // set to zero to apply without re-sizing
var PictureHeight = 800; // if PictureWidth = 0 this value is irrelevant !!
var PictureResolution = 72;


Just remember that the script will do what you ask i.e. apply a 30 pixel or whatever border to your image. Now it your image WAS 3000+ pixels wide then this border will be tiny so you need to take this into account.

Should the border be a percentage of the overall size ?? This would fix the above problem!..... hummmmmm....

Ok version 1.0.5 coming later with ability to set borders and strikes as a percentage :)


 
*** NOTE v1.0.5 is NOT yet uploaded ***

This has opened a whole can of worms with respect to features....

var BorderIsPercent = true;

var StrokeWidth = 2;
var StrokeColor = red;

var BorderWidth = 10;
var BorderColor = black;

var OuterBorderWidth = 2;
var OuterBorderColour = red;


As you can see I have now added a variable 'BorderIsPercent' which when set to true makes the border variables for Width into percentages rather than absolute. This allows you to apply a border which is fixed in size ie for the above 15% of 800 would be 120... if applied to picture 3050 wide the border would be 450odd which would be the same...


All well and good BUT the font size and character location now need work or it looks silly, so I am now doing that and version 1.0.5 will include it.

I actually like the idea that you can set things as percentages this is maybe something that should have been added earlier. If anyone has any further ideas then just let me know, I am quite happy to. Only problem is that it keeps pushing the contact sheet script back :)
 
This update is taking a little bit longer than expected....

As I don't actually have any instructions it is difficult to get everything to work just as expected and without causing further problems but I'll get it working.

If anyone has any books on javascript or scripting for photoshop you could donate them to the cause :)
 
Can anybody give me some comprehensive instructions on using the script with elements 6 and 7? So that I can add these to the web site.
 
Well I have spent the last 4 hours trying to get the script to automatically place the text in the middle of the border! I get it working and then change the border size and it messes up again. As I don't have the books I cannot find a function to find the actual height of the font being used. Anybody able to help with that, would be appreciated. Other than that the next version is nearly finished.
 
Im not sure what sort of books help?

Is it javascript books, or creating photoshop scripts?

Taken from http://www.outbackphoto.com/workflow/wf_a102/essay.html which seems quite good.

"The Scripting Guide gives a good overview of how scripting fits into Photoshop. The Reference Guides are essential for finding out how to do anything at all with the scripting APIs. All of these PDFs are included with the PSCS2 distribution.

* Adobe Photoshop CS2 Official JavaScript Reference is a hardcopy of the documentation. Handy for people who still like to read ink-on-paper.
* JavaScript: The Definitive Guide (Flanagan) is always within arms reach at my desk. This book is the single best book on JavaScript I've found. You need this book if you are going to code in JavaScript.

For a more introductory level book, I've heard good things about Beginning JavaScript (Wilton), but there are a great many other books on the market for getting started with JavaScript. Check your local bookstore.

For an online JavaScript reference www.croczilla.com is a fairly good site. There are others out there as well. Google can point you to them if croczilla doesn't work for you."

Another site I have bookmarked is http://www.kirupa.com/motiongraphics/ps_scripting.htm
 
Im not sure what sort of books help?

Is it javascript books, or creating photoshop scripts?

Taken from http://www.outbackphoto.com/workflow/wf_a102/essay.html which seems quite good.

"The Scripting Guide gives a good overview of how scripting fits into Photoshop. The Reference Guides are essential for finding out how to do anything at all with the scripting APIs. All of these PDFs are included with the PSCS2 distribution.

* Adobe Photoshop CS2 Official JavaScript Reference is a hardcopy of the documentation. Handy for people who still like to read ink-on-paper.
* JavaScript: The Definitive Guide (Flanagan) is always within arms reach at my desk. This book is the single best book on JavaScript I've found. You need this book if you are going to code in JavaScript.

For a more introductory level book, I've heard good things about Beginning JavaScript (Wilton), but there are a great many other books on the market for getting started with JavaScript. Check your local bookstore.

For an online JavaScript reference www.croczilla.com is a fairly good site. There are others out there as well. Google can point you to them if croczilla doesn't work for you."

Another site I have bookmarked is http://www.kirupa.com/motiongraphics/ps_scripting.htm

It is the PS APIs that are the problem mainly. What do I call and with what variables in order to do something in particular? I have been programming for nearly 30 years so I can work out how to do things if nec although a book on javascript would be helpful :) I have read several times about a PS API doc somewher in the installation but I have CS3 and cannot find it anywhere. If someone can point me to it it would vastly accelerate the development.

Like I said I am trying to do several different scripts including contact sheets etc etc

If anyone has any old javascript books they can donate it would be appreciated. Also if anyone has upgraded to the latest elements and has an older one WHICH IS NEW ENOUGH TO ALLOW SCRIPTS then that too would be helpful as I can test it on elements.
 
Announcement


I am now working on VERSION 1.1.0 I am making this a major upgrade because there has been a great deal of re-working and I have not quite finished yet but here is a taster.....


DONE..

You can now set the border size as a percentage of the picture size. (useful when you choose not to re-size the image)

You can now set the TEXT size as a percentage of the border size!

Text is now automatically positioned central to the border no matter which font is used and no matter what border size!

Several bugs ironed out

Addition of far more remarks within the script making it easier to see how it is done.

The personal data and library are now in a separate files so that when you update it does not affect the personal data etc.



DOING..

You can CENTRE the text for any of the borders

Some other tweaks and additions......

Even more remarks....




I am looking at releasing this upgrade after the weekend after thorough testing etc.

Any ideas speak now and they may make it into this upgrade.....

NOTE: There are a couple of people who have asked for help setting up the border to their spec. I will help you to do this as soon as I have finished this version because there are so many changes with this version you are likely to have to do it again!! If this is you just bare with me for a few days and then send me a PM or email me and I will sort it.

And a public thank you to Keltic Ice Man who is doing a lot to help behind the scenes :)
 
And a public thank you to Keltic Ice Man who is doing a lot to help behind the scenes

:agree: I stopped at version 1.02 I think, once I found a version that suited what I want and dont want to get confused with later editions but I too would like to thank Cowasaki & Keltic for their assistance and persistance on this useful tool, :thumbs:
 
:agree: I stopped at version 1.02 I think, once I found a version that suited what I want and dont want to get confused with later editions but I too would like to thank Cowasaki & Keltic for their assistance and persistance on this useful tool, :thumbs:

You might want to have a look at version 1.1.0 though :)
 
No I dont ... Id have to go through my 100+ photos and convert them all again , no way, not interested, I wont go there .... well maybe just a peek :(
 
No I dont ... Id have to go through my 100+ photos and convert them all again , no way, not interested, I wont go there .... well maybe just a peek :(

You'll be waiting for version 1.2.0 then :) You just select the folder then go and make a brew :)
 
I have been messing about with the script that produces borders with exif information added and have just about achieved what I want but I have two questions.

Firstly under camera model it insists on putting "Canon EOS 400D DIGITAL" is there any way of removing the word DIGITAL. I know I could edit the text line but I was think a more permanant fix.

The other question is can you move the copyright information to the bottom right corner, so it goes horizontal rather than up the side?
 
Thanks very much cowasaki, worked at treat, once I had downloaded an editor
 
Thanks very much cowasaki, worked at treat, once I had downloaded an editor

You should be able to edit the script with notepad, or wordpad on a PC rather than needing an editor.


Cowasaki is doing the hard work :D I just supply the cups of tea :woot:

"The personal data and library are now in a separate files so that when you update it does not affect the personal data etc." - That sounds excellent!
 
I have been messing about with the script that produces borders with exif information added and have just about achieved what I want but I have two questions.

Firstly under camera model it insists on putting "Canon EOS 400D DIGITAL" is there any way of removing the word DIGITAL. I know I could edit the text line but I was think a more permanant fix.

The other question is can you move the copyright information to the bottom right corner, so it goes horizontal rather than up the side?


I'll add it to version 1.1.0 as a feature, "Rename my camera !".


EDITED - DONE
 
The other question is can you move the copyright information to the bottom right corner, so it goes horizontal rather than up the side?

You can change the variable:

var DisplayRight = false

Then use the section "Displaying copyright text" to display anything you like, anywhere you like.
 
Right I need someone running XP and someone running Vista to install a quick script and tell me what happens when you run it:

script is here

It should respond TRUE on a Mac and FALSE on a PC
 
I get a script alert that just says 'True' using the test script on XP and CS3
 
I get a script alert that just says 'True' using the test script on XP and CS3

Could you edit the script to say

if(temp.charAt(1) == ":")

instead of

if(temp.charAt(0) == "C")

leaving the curly bracket where it was ie just change the number 0 to 1 and the C to a colon.

and let me know what happens please


I am trying to find a way to detect if it is running on a mac or PC to avoid errors later by having specific code for each...
 
Script alert :

/c/Program%20Files/Adobe/Adobe%20Photoshop%20CS3
 
Script alert :

/c/Program%20Files/Adobe/Adobe%20Photoshop%20CS3

nearly there then......


Please can you change it like this:

if(temp.subStr(0,2) == "/c/") again leaving the semi colon

thanks

Sorry can you make it...


if(temp.charAt(2) == "/")
 
Error24:temp.subStr is not a function
 
/c/Program%20Files/Adobe/Adobe%20Photoshop%20CS3

as before
 
Looking better ... false
 
Right version 1.1.0 appears to be ready now but I'm off to work so no time to upload it. Will upload new version with instructions tomorrow.

The Zip file will now contain the main script file plus a folder called Cowlib. Cowlib contains 3 library files: the user data file; my script library and a user overrides file plus 2 example png files for the icon and signature. Once installed (instructions will be on my site) it should all work happily then as there are upgrades you should just replace the main script file unless told otherwise! (and because of the separate files you will not have to mess around changing all the variables plus you could have 2,3,4 or more main script files using the same user data file) - for things like: upload to TP, client examples, web page etc etc

Off to work now till 3am !
 
Right new version 1.1.0

This is the big one, this is a virtual re-write of whole sections and a move to a more modular setup. This script is now split into several files which allow a great deal more flexibility such as allowing you to have scripts for your professional work and images on here. There are extensive instructions within each separate file and on the web site below.

The main new features are:

  • Add auto set of font size.
  • Set border size as a percentage of picture size
  • Set font size as a percentage of picture size
  • Complete re-write of the calculations re positioning of text with borders which are now auto centered.
  • Added ability to rename your camera
  • Windows and Mac specific sections with auto detection of your OS.
  • Split the full script into seperate scripts to make updating easier

I will be writing an extensive instruction manual and uploading this as a PDF file in the next day or so before switching my attention to the second script which will be the contact sheet script. All subsequent scripts will refer to the libraries and user data files from this script so that you need to change less information and as such you will need to install this version of EBS (Exif Border Script) in order to use any of the new scripts.

I will now include several scripts with the ZIP file and from subsequent versions there will be a NEW USERS version and an UPGRADE version with full instructions.

This version contains two scripts "EBS - default" and "EBS - ICON no EXIF or FILENAME".

I will also have a download option for individual EBS scripts and will shortly allow people to submit their own EBS scripts for inclusion if appropriate or alternatively as people ask me how to do certain things the script in question may well end up in the list.


 
hah, I'm loving the way this is developing, perhaps we should have a Talk Photography SVN server for user supported scripts?
 
hah, I'm loving the way this is developing, perhaps we should have a Talk Photography SVN server for user supported scripts?

Any scripts can be sent to me and I will host them on my site.

It is much tidier now split up as it is. I have for the first time included two different scripts and I will be able to upload several different ones.
 
Status
Not open for further replies.
Back
Top