Photoshop Script for Border (with Exif data)

Status
Not open for further replies.
Colour Space...... DONE

// ColourSpace

var CS_Alter = true;

var CS_New = "sRGB IEC61966-2.1"; // Specific name of the colour profile you want to select;

//var CS_New = "Apple RGB"; // Specific name of the colour profile you want to select;
//var CS_New = "ProPhoto RGB"; // Specific name of the colour profile you want to select;
//var CS_New = "Working Gray - Dot Gain 20%"; // Specific name of the colour profile you want to select;
//var CS_New = "Working CMYK - U.S. Web Coated (SWOP) v2"; // Specific name of the colour profile you want to select;
//var CS_New = "Gray Gamma 2.2"; // Specific name of the colour profile you want to select;
//var CS_New = "Gray Gamma 1.8"; // Specific name of the colour profile you want to select;

Basically two lines are important here:

var CS_Alter = true;

This turns the Colour space change on &

var CS_New = "sRGB IEC61966-2.1"

This selects the colour space by name, note there are a number of them listed above just to make it easier. Put // in front of the above line and delete the // from the front of the line containing the colour space you want OR type in the new colour space (but be VERY careful and get every character exactly right!)
 
Thanks, will have a look at it later today, of out taking pics soon.
 
Just thinking - might it be worth having some version control in the program. Im getting lost with all the brilliant changes ;)

Allan

DONE - All new versions will have the version number and date at the start
 
Also I tried using the copyright text line to put text on the picture, It put the text on but not in the middle. This was at 800 x800 - infact very little change to the script that gets downloaded

Woops, it was using the maximum size of the picture as a conversion factor rather than the original size therefore it wasn't working as expected.

FIXED
 
Right, new version uploaded complete with all fixes and all requested additions. This will now be version 1.00 anything before today was a pre-release version :)

If there are any further requests please let me know.

I have also thoroughly updated the web page which is now clearer and has examples.




 
I'm getting an error with the latest version on CS3.

script-error.png


... never mind I'm being an idiot. Would help if I had a file selected to work on!
 
Files saves well :)

With the copyright text, perhaps as well as having the X and Y co-ords I wonder if there might be a way where I could just say middle and it puts the middle of the text into the middle of the pic. At the moment I have tried 50, 50 but the copyright shows over to the right. Just a thought ;)

The location is the top left of the text, do you want an option to center your text at the point? It shouldn't be difficult and would make sense. Let me know. All these examples add to the script.

I am going to create 2 new versions of the script as seperate scripts.

One will ask a number of questions in order to create the picture rather than using defaults. Ideal if you want a one off picture.

The second will take a directory as an input and do this to the whole directory, ideal for samples for the bride and groom etc - for our pro wedding togs etc

Currently outstanding features......

The above Left tie, Centre tie, Right tie option for text.

AUTO FTP uploader so upload your picture to your on line pictures directory for submitting to forums etc (I did promise to write a program to automate uploading to TP a while ago but didn't get round to it. This would be far better as machine independant. Not sure how I could do this for TP though as not sure on protocols etc but will take a look anyway!
 
My new logo added to the picture using the new script:

chloelogo.jpg


Its little bear, not only is he my avatar he is now the logo!

Oh and not an addition but using the 'copyright' text for something else, instructions for all these are on my site now as are further instructions too.

chloeSample.jpg
 
I have started on the script to create contact sheets, it might be some time though as unfortunately I do not have a reference manual for either javascript or photoshop scripting :)

I got the routine to ask for the folder, import the list of files and set up the main variables done last night then spent an hour trying to work out how to convert a real number into an integer or just loose everything after the decimal place :) Still haven't found it! ..... This is the time consuming thing for me as I only started programming in javascript last week :)
 
The location is the top left of the text, do you want an option to center your text at the point? It shouldn't be difficult and would make sense. Let me know. All these examples add to the script.

Yep if we could tell it to use the centre of the text rather than the top left point that would be great, as I could then put my copyright text across the middle of the pic.
 
Hmmm having some trouble with the copyright image overlay.

If I set the values of IM_X and IM_Y to 10 each, the logo appears top left... but if I set them to something like 90 each it appears smack bang in middle and not bottom right where I would expect (and desire)

What have I done wrong? I've been staring at this code for ages trying to figure it out!
 
Hmmm having some trouble with the copyright image overlay.

If I set the values of IM_X and IM_Y to 10 each, the logo appears top left... but if I set them to something like 90 each it appears smack bang in middle and not bottom right where I would expect (and desire)

What have I done wrong? I've been staring at this code for ages trying to figure it out!

Same bug as in copyright text location. Bug for image location is now fixed.

Version 1.01 release can now be downloaded.
 
Thanks very much!

Its been rather too long since I stared at code for hours! Was driving me batty!

I've hacked even that version around as I want my logo to be an exact offset position from the bottom right hand corner and not derived from a percentage of the image size as this will vary on portrait vs landscape (or, god forbid, if I start using whacky non 2:3 aspect ratio crops!)

Perhaps if you are looking for other suggestions, then perhaps a way of setting such a hard pixel offset from each of the corners, all selectable with variables.

If I hadn't gone so code blind, I'd offer to code it myself, but my bodged version is too nasty to share :D
 
Thanks very much!

Its been rather too long since I stared at code for hours! Was driving me batty!

I've hacked even that version around as I want my logo to be an exact offset position from the bottom right hand corner and not derived from a percentage of the image size as this will vary on portrait vs landscape (or, god forbid, if I start using whacky non 2:3 aspect ratio crops!)

Perhaps if you are looking for other suggestions, then perhaps a way of setting such a hard pixel offset from each of the corners, all selectable with variables.

If I hadn't gone so code blind, I'd offer to code it myself, but my bodged version is too nasty to share :D

....... standby version 1.02 !!! :)
 
Oh its always fun to find a coder who just loves another suggestion for an extra feature :D

Thanks in advance!
 
Oh its always fun to find a coder who just loves another suggestion for an extra feature :D

Thanks in advance!

DONE...

You can now specify the location by percentage or absolute value relative to any corner of the image! Just adding the same functionality to the copyright text section too.
 
Right new version 1.02

Now copyright text and copyright images can be located as an absolute position OR as a percentage. When located as an absolute position this can be relative to ANY corner.

Copyright Text

New variable CT_XY_Units this is set to one of the following (percentage, abs_tl, abs_tr, abs_bl, abs_br). If for example you always want your text 100 pixels from the X side and 80 pixels from the bottom you would type the following line:

var CT_XY_Units = abs_br; (absolute bottom right) (abs_tl = top left, abs_tr = top right & abs_bl = bottom left)

the variables CT_X and CT_Y are the number of pixels or percentage dependant on the value of CT_XT_Units.

Copyright Image

This is the same as above for copyright text but using the variables IM_XY_Units, IM_X and IM_Y

The variable IM_Percentage has been removed and replaced by the variable IM_size.

If the variable IM_XY_Units is percentage ie "var IM_XT_Units = percentage;" then IM_size refers the the PERCENTAGE of the main graphic that the copyright or logo will take up.

If the variable IM_XY_Units is set to one of the absolutes then the variable IM_size is the absolute size in pixels.

So if you want to place your icon at a size of 80x80 pixels 140 pixels from the right hand side and 120 pixels from the bottom (note this includes the border) you would use the following code:


// Displaying copyright IMAGE

var DisplayCopyrightImage = true;
var IM_Name = "~/Documents/Signature.png";

var IM_XY_Units = abs_br; // percentage, abs_tl, abs_tr, abs_bl, abs_br
var IM_X = 140; // X location by percentage or absolute as per above
var IM_Y = 120; // Y location by percentage or absolute as per above
var IM_size = 80; // Height as a Percentage or absolute depending on above

var IM_Transparency = 85;


IM_XY_Units is set to abs_br because we want this fixed to the bottom right corner.
IM_size is in pixels because IM_XY_Units is based on an absolute value.






 
Thanks very much!!!
 
Right new version 1.02

So if you want to place your icon at a size of 80x80 pixels 140 pixels from the right hand side and 120 pixels from the bottom (note this includes the border) you would use the following code:


// Displaying copyright IMAGE

var DisplayCopyrightImage = true;
var IM_Name = "~/Documents/Signature.png";

var IM_XY_Units = abs_br; // percentage, abs_tl, abs_tr, abs_bl, abs_br
var IM_X = 140; // X location by percentage or absolute as per above
var IM_Y = 120; // Y location by percentage or absolute as per above
var IM_size = 80; // Height as a Percentage or absolute depending on above

var IM_Transparency = 85;


IM_XY_Units is set to abs_br because we want this fixed to the bottom right corner.
IM_size is in pixels because IM_XY_Units is based on an absolute value.



Hi, Having problem getting my head around the absolute image size, my copyrigt image is 150 X 59 Pixels if I set it to 150 it distorts, I take it this is to do with it not being square, any idea how I can get this to work.
 
Hi, Having problem getting my head around the absolute image size, my copyrigt image is 150 X 59 Pixels if I set it to 150 it distorts, I take it this is to do with it not being square, any idea how I can get this to work.

the routine is supposed resize both directions by the same amount so that the shape does not change. It was working on % and so it should do for pixels too. It seemed to work for me last night. If you actual icon is 500x150 and you put 200 it make it 200x60. If this is not happening then just post your variables and I will take a look. I am at not near a computer now so can't see for myself (iPhone!)
 
Hi, Sorry still having problems with the logo, my logo has a height of 59px and width of 150px, I am using it as follows but it still distorts the logo, any ideas what I,m doing wrong, have tryed it specifying size as 150aswell but get simaler results.

var DisplayCopyrightImage = true;
var IM_Name = "~/Pictures/tpsig.png"; // This is for MAC. On Windows Vista change to: var IM_Name = "~/Pictures/Signature.png"; and store in users Picture directory, On XP change variable in format "c:/signature.png"

var IM_XY_Units = abs_br; // percentage, abs_tl, abs_tr, abs_bl, abs_br
var IM_X = 100; // X location by percentage or absolute as per above
var IM_Y = 100; // Y location by percentage or absolute as per above
var IM_size = 59; // Height as a Percentage or absolute depending on above

var IM_Transparency = 85;
 
Thanks for your files, I have fixed the bug. It was re-sizing in both directions the same (and my test image was square!!).


Version 1.03 now uploaded







 
Thanks for that seems to work for me now, only one small nigle though (sorry) in the script when you go to the bit to set the logo size, it says in your promts to set height, have found it is width it is looking for, just a small one and nothing drastic.

Thanks for all your hard work and effort on this script (y)

Thanks for your files, I have fixed the bug. It was re-sizing in both directions the same (and my test image was square!!).


Version 1.03 now uploaded







 
Thanks for that seems to work for me now, only one small nigle though (sorry) in the script when you go to the bit to set the logo size, it says in your promts to set height, have found it is width it is looking for, just a small one and nothing drastic.

Thanks for all your hard work and effort on this script (y)

Oh yes, changed my mind at the last minute ! I have changed it now. Uploaded version 1.03b (not changing the version number for a comment!)
 
I will get back to writing the contact sheet script in a few days too but anybody find any other problems let me know.
 
hi, is this still available, I am getting a user name / pasword dialog box on that web site.

cheers
 
Mattyh's link doesn't work, thats the one that brings up the user name etc
 
think i used mateyhs link, going through the other now :)
 
I have been using this script and love it very much.... But i am wondering is there a way to use the script without it resizing the image?
 
Status
Not open for further replies.
Back
Top