Photoshop Script for Border (with Exif data)

Status
Not open for further replies.
I know about the text not fitting problem for certain sizes and it IS my next job with it. You can however select that layer and move the text

Cant see for looking:eek:select that layer and move the text,indeed:wacky:


Cheers.
 
Thanks :)

Don't suppose you worked out what the savefile routine in the script needs to call it. Do I need to pass it the filename? (I know its not your code, but i cant make anything of it)

I will take a look after fixing the text/size problem - There are two approaches:

1 - Create a correction factor so: works for 800, we want 1000 - Correction factor = 1.25 and apply this to everything

2 - Resize EVERY picture to 1000x1000 apply changes which can be adjusted perfectly THEN resize to 800x800


Option 2 is easiest and leaves less problems, I was working on option 1 but there are SO many things to apply the correction factor to I will switch to number 2 :)
 
I will take a look after fixing the text/size problem - There are two approaches:

1 - Create a correction factor so: works for 800, we want 1000 - Correction factor = 1.25 and apply this to everything

2 - Resize EVERY picture to 1000x1000 apply changes which can be adjusted perfectly THEN resize to 800x800


Option 2 is easiest and leaves less problems, I was working on option 1 but there are SO many things to apply the correction factor to I will switch to number 2 :)

Oh bugger, can't use option 2 as we loose all the layers........
 
Cheers K.

What i should of put at the end instead of "indeed" was you stupid git, why didn't i think of that,:bonk:

I sure i clicked the bl££dy layer but did nothing with it......

Del.
 
cowasaki.

Hats off to you mate for putting so much of your own time to this..........(y)


Now hurry up and sort out the bugs :wave:

Just kidding:clap:
 
cowasaki.

Hats off to you mate for putting so much of your own time to this..........(y)


Now hurry up and sort out the bugs :wave:

Just kidding:clap:

Sorry !

Bugs FIXED !

Just working on the SaveJpeg bit now so I can add an autosave OPTION

Also added an option to make the EXIF text a different size.

I added an outerborder option yesterday too if anyone had noticed :)
 
Thanks for all the effort your putting into this(y) now any chance of a lesson in how to get my logo on the image, I just can't workout which lines to change :bang:

I've change the file name as on your website instructions but I get the following error

error.jpg
 
Right BUGS fixed, you can now have the output picture size whatever you like.

Note added outerborder

Added variable TextSizeBottom (this is automatically set to the same as TextSize) and so makes NO difference. HOWEVER it now means that you CAN set this variable to maybe 10 if you find that the EXIF data does not fit onto the bottom line especially on portrait shots!

And especially for Keltic Ice Man.......

// Autosave options

var autosave = true; // set to true to auto save the picture
var autoask = false; // set to true to prompt user for a filename to save
var autodirectory = "~/Pictures"; // MAC format change to C:/.... for Windows
var autofilename = "Last Picture"; // change to autofilename = filename to use existing !

This section allows you to automatically save your picture.

autosave = if you set this to true it invokes the autosave option..

autoask = if set to false it uses the variables autodirectory and autofilename, if set to true it produces a prompt allowing you to set the filename each time

autodirectory = which directory to save your file in

autofilename = what to save it as




 
Thanks for all the effort your putting into this(y) now any chance of a lesson in how to get my logo on the image, I just can't workout which lines to change :bang:

Yes, no problem.....

I will add a detailed lesson on my site in the next few days but basically.

1) create your logo

This should preferably be a PNG file as this is best for the transparency information. Load photoshop and create a picture with a transparent background. Easiest way to do this is to drag your background layer down onto the NEW LAYER box which duplicates it but as a NON background layer then delete your original background layer. Once you have done this you will notice that the eraser tool leaves a cross hatch effect, this is what we are looking for! Basically you need to create your logo/signature or whatever with a transparent background around it. You then save this file as logo.png or whatever. The default location is called SIGNATURE.PNG inside your Documents directory on a MAC. On a PC you are forced to change the variable IM_Name to be the location of your file eg "C:\Signatures\default.png"

2) Edit the "EXIT Border.js" file:


// Displaying copyright IMAGE

var DisplayCopyrightImage = false;

Change this variable to true (note it is case sensitive so true)

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

Change this variable to point to your file. Note '~' on a MAC signifies USERS ROUTE DIRECTORY so the file is called Signature.png and is stored inside the users documents directory

var IM_X = 10; // Percentage
var IM_Y = 10; // Percentage

These two variables are the X and Y location as a percentage of the overall picture width / height.

var IM_percentage = 20; // Height as a Percentage

This value is the percentage width of the logo in comparison to the full width. NOTE only width, I have chosen not to re-size the logo in both directions or this would change it's shape.

var IM_Transparency = 100;

This value is the transparency of the logo against your picture. If set to 100 then it completely covers that section of the picture.


You can download an example signature file HERE
 
Thanks for all the effort your putting into this(y) now any chance of a lesson in how to get my logo on the image, I just can't workout which lines to change :bang:

I've change the file name as on your website instructions but I get the following error

error.jpg

That error means the file does not exist!

What computer are you using MAC or PC?

MAC = leave it as it is and save the file as Signature.png in the Users Documents directory.

Windows = Make a directory on drive C as "Signatures", save the signature inside that directory as "Signature.png". Change the variable IM_Name to be "C:/Signature/Signature.png"

Vista = You can use the ~ as well but this refers to the users documents directory rather than home directory so in Vista you can change this to

IM_Filename = "~/Pictures/Signature.png" and store the signature as signature.png in your pictures directory.
 
Been trying this myself on windows vista, if I cange as you say it dose not work, if I leave it as is and use pictures instead of documents it works.

Thanks for all the effort your putting into this(y) now any chance of a lesson in how to get my logo on the image, I just can't workout which lines to change :bang:

I've change the file name as on your website instructions but I get the following error

error.jpg

That error means the file does not exist!

What computer are you using MAC or PC?

MAC = leave it as it is and save the file as Signature.png in the Users Documents directory.

PC = Make a directory on drive C as "Signatures", save the signature inside that directory as "Signature.png". Change the variable IM_Name to be "C:\Signature\Signature.png"

Note switching from PC to MAC and back I sometimes get my forward and backwards / \ wrong :( anyway above should work, if not shout at me
 
Been trying this myself on windows vista, if I cange as you say it dose not work, if I leave it as is and use pictures instead of documents it works.

What have you got the actual variable set to ?

Just tested it on my MAC and it works fine but I have saved my Signature as Signature.png in the Documents directory....
 
What have you got the actual variable set to ?

Just tested it on my MAC and it works fine but I have saved my Signature as Signature.png in the Documents directory....

Works fine with this in window vista, if I change as you say for windows get the error.

// Displaying copyright IMAGE

var DisplayCopyrightImage = true;
var IM_Name = "~/Pictures/tpsig.png";
var IM_X = 10; // Percentage
var IM_Y = 10; // Percentage
var IM_percentage = 20; // Height as a Percentage
var IM_Transparency = 100;
 
Works fine with this in window vista, if I change as you say for windows get the error.

// Displaying copyright IMAGE

var DisplayCopyrightImage = true;
var IM_Name = "~/Pictures/tpsig.png";
var IM_X = 10; // Percentage
var IM_Y = 10; // Percentage
var IM_percentage = 20; // Height as a Percentage
var IM_Transparency = 100;

So '~' refers to what in Vista ? Oh and does this happen in XP?

Sorry I no longer have a PC running Photoshop the licence only allows one install on desktop and one on laptop !
 
Just thinking - might it be worth having some version control in the program. Im getting lost with all the brilliant changes ;)

Allan

It would probably help wouldn't it !!

The latest version is always on my site, I did say I was going to store the user data in a seperate file BUT this keeps needing to change too!
 
So '~' refers to what in Vista ? Oh and does this happen in XP?

Sorry I no longer have a PC running Photoshop the licence only allows one install on desktop and one on laptop !

I would asume the user directory, in it there is a documents folder and a seperate pictures folder, not sure about xp as no longer run it on my macines.
 
I would asume the user directory, in it there is a documents folder and a seperate pictures folder, not sure about xp as no longer run it on my macines.

OK will change the instructions for Windows users then with the above in mind....
 
It works on xp ...

var DisplayCopyrightImage = true;
var IM_Name = "c:/signature.png";
var IM_X = 10; // Percentage
var IM_Y = 10; // Percentage
var IM_percentage = 20; // Height as a Percentage
var IM_Transparency = 30;

....with these settings. The \ in c:\ needs to be a / so c:/ lol


Excellent work btw :)
 
Right uploaded new instruction page and new script file (you dont need to download the new one though as only the remarks have been changed!)

Keltic Ice Man...

Did you try the Save As Jpeg option? Does it do what you wanted?
 
:LOL: I got it to work on XP, and it was my fault. I had c:\ and not c:/
 
var autofilename = "Last Picture"; // change to autofilename = filename to use existing !

I changed the line to

var autofilename = filename; // change to autofilename = filename to use existing !

and it didn't seem to like it, have I understood the instructions right? So I would like it to use the same filename as my psd file that it is operating on


Error was Error2 - filename underfined
 
Keltic Ice Man.. It should work as it is but I will just add some options to allow you to automatically use the original filename
 
I have made changes to the auto file save option and added the autooriginal variable.

---------

Basically if you set the variables as follows:

var autosave = true;
var autoask = true;
var autooriginal = false;
var autodirectory = "~/Pictures";
var autofilename = "Last Picture";

it will prompt you for a filename and location then save a jpeg called whatever you state in the directory that you stated.

-------

if you set the variables as follows:

var autosave = true;
var autoask = false;
var autooriginal = true;
var autodirectory = "~/Pictures";
var autofilename = "Last Picture";

it will save a file with the filename as per the original but as a jpeg in the directory Pictures.

-------

if you set the variables as follows:

var autosave = true;
var autoask = false;
var autooriginal = false;
var autodirectory = "~/Pictures";
var autofilename = "Last Picture";

it will save a file with the name as per the variable autofilename but as a jpeg in the directory as per the variable autodirectory.
 
Thanks Darren thats great!

Can the quality by a variable as well please.

I can beat that :)

Two new variables added:

var autoquality = 100; // To this to the start quality
var automaxsize = 200; // Maximum size in K of saved file. If set to 1000 then it saves at max quality.

autoquality is the default save quality out of 100 as you requested.....

automaxsize is the maximum size of the file in K, if you set this to 1000 it just saves it at whatever quality you requested but if you set it at a lower figure it determines the best quality that will fit starting at the quality that you requested in autoquality. ie if you set it to 85 it saves it as 85% of maximum quality then checks the file size. If the file is too large it reduces the quality and saves it again until the file size fits within the requested maximum until the quality reaches 0 and it just saves it at that.

This is ideal for automating the creation of files for Talk photography by setting the maximum to 200K


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

The copyright text works for me, the location in the variables is the location of the top left corner of the text. What is happening on your.



By the way I have not uploaded this version yet......... will do later but working on yet another change.....
 
Right, now two more additions:

var autoquality = 100; // To this to the start quality
var automaxsize = 200; // Maximum size in K of saved file. If set to 1000 then it saves at max quality.

As explained earlier, this sets the quality of the jpeg as it saves it AND can set the maximum file size therefore allowing you to shrink files to fit within Talk Photography's maximum file size at the maximum quality.

PLUS

// Sharpen

var sharpen = true;
var sharpamount = 50;
var sharpradius = 1;
var sharpthreshold = 0;

yes now it will invoke the unsharp mask with fixed values as per the above, latest script on my site.........


 
Anybody comment on what the best values are for the sharpness mask !!
 
Status
Not open for further replies.
Back
Top