PDA

View Full Version : Exif Script


hir0
03-25-2005, 7:01 AM
Thanks to Kevin Riley from Shutterbug forum for finding this script. (http://home.hawaii.rr.com/michihiro/Stamp%20EXIF%20v2_2.js)

save it somewhere, right click the file and select edit and change the copyright name =]
to use this script, open your photo in photoshop and do your processing,
click file -> scripts -> browse -> navigate to wherever you saved the script.
keep in mind this only works for photos that still contain the exif data.

JerseyJay
03-25-2005, 8:00 AM
Hiro,

I have been using that one for a while. Works like a charm. Thanks for posting.

Verse914
03-29-2005, 2:58 PM
Very cool! I have never seen this.

Ibn
03-29-2005, 4:32 PM
Very nice. Been interesting in something like this after seeing Simon's. Can't wait to try it out.

nomaddan
04-01-2005, 4:59 PM
hiro, thanks for the script.

Peligrin
04-01-2005, 6:10 PM
Does Photoshop Elements do scripts? I can't see how to do it.

Leigh

Ibn
04-02-2005, 2:03 PM
Hmm...question here for you guys. I downloaded PS 7.0 script plug-in v.1.0.2.a for PS 7.0.1 and tried running the script, but after it's done running, I end up w/a shrunken gray image w/a circular dot in the middle of it...

Also, the path that I took for the script is different. It's not file>script, but rather file>automate>scripts.

paradise
04-02-2005, 3:08 PM
ok, guys, I love this script, EXCEPT. What if I just want to put my copyright in it and align it right. And use my own font. I Tried changing the font to another name, but it's ignoring it. And I dont always have exif so it looks weird. How do I use it for just a right aligned copyright in my own color/font?

Finz
04-02-2005, 3:13 PM
Hmm...question here for you guys. I downloaded PS 7.0 script plug-in v.1.0.2.a for PS 7.0.1 and tried running the script, but after it's done running, I end up w/a shrunken gray image w/a circular dot in the middle of it...

Also, the path that I took for the script is different. It's not file>script, but rather file>automate>scripts.


Try the script at this link for PS7

http://mlkdesign.online.fr/tutorials/scripting/scripting6_1.html

Finz
04-02-2005, 3:59 PM
ok, guys, I love this script, EXCEPT. What if I just want to put my copyright in it and align it right. And use my own font. I Tried changing the font to another name, but it's ignoring it. And I dont always have exif so it looks weird. How do I use it for just a right aligned copyright in my own color/font?

I know nothing about writing scripts - really but here is one that I edited. Change the number after TI.position = [ to move the text to the right. Copy the text into a text editor and save it as a .js file . I tried several different fonts, some worked some didn't. :-D

displayDialogs = DialogModes.NO;
var defaultRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;

//function below credited to 'bradles' over at the Adobe User to User forums.
function explodeArray(item,delimiter) {
tempArray=new Array(1);
var Count=0;
var tempString=new String(item);
while (tempString.indexOf(delimiter)>0) {
tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter) );
tempString=tempString.substr(tempString.indexOf(de limiter)+1,tempString.length-tempString.indexOf(delimiter)+1);
Count=Count+1
}
tempArray[Count]=tempString;
return tempArray;
}

var AD = activeDocument;
var resRatio = AD.resolution/72;

if(resRatio!=1){
AD.resizeImage(AD.width.value,AD.height.value,50);
}

var heightVar = AD.height.value+2;

var black = new SolidColor();
black.rgb.red = black.rgb.green = black.rgb.blue = 0;

var white = new SolidColor();
white.rgb.red = white.rgb.green = white.rgb.blue = 255;

backgroundColor = white;

AD.resizeCanvas(AD.width.value+4,AD.height.value+4 ,AnchorPosition.MIDDLECENTER);
AD.resizeCanvas(AD.width.value,AD.height.value+60, AnchorPosition.TOPCENTER);

var nameLayer = AD.artLayers.add();
nameLayer.kind = LayerKind.TEXT;
var TI = nameLayer.textItem;
TI.position = [350,heightVar+16];
TI.contents = "\u00a9 James Kuhn 2005";
TI.font = "Mistral";
TI.size = 16;
TI.color = black;
TI.fauxBold = true;

AD.flatten();



http://img.photobucket.com/albums/v136/JamesKuhn/script-example.jpg

paradise
04-02-2005, 5:08 PM
Here is what I came up with. James, your change did not work for me, I just took out the last command (flatten) and edited the layers manually, then cropped.

http://aquatic-photography.com/pics/sd0325021.jpg

Now, who can make it so that it just does THIS!!!

Finz
04-02-2005, 6:23 PM
For some reason, the board software is adding a space where there shouldn't be one. Change the extension of the attached file to .js instead of .txt and try it - it really should work. Let me know what color you want the background and text and I'll change it for you.

http://img.photobucket.com/albums/v136/JamesKuhn/script-example2.jpg

Obliviou$
04-02-2005, 7:24 PM
Genius, thanks :)
Though there's no ISO info...

http://img.photobucket.com/albums/v415/AlexChristensen/script.jpg

hir0
04-02-2005, 7:36 PM
i think if you convert from raw the iso info should be there. at least, that's my experience with it.

Ibn
04-03-2005, 5:06 AM
Try the script at this link for PS7

Hmm...don't see the link you're referring to...

Finz
04-03-2005, 10:35 AM
Hmm...don't see the link you're referring to...

I'm so sorry - I fixed it
here you go

http://mlkdesign.online.fr/tutorials/scripting/scripting6_1.html

328iGuy
04-04-2005, 10:11 AM
How do I execute scripts in PSCS after copying it to the "Scripts" folder???

Looks very interesting! :)

Finz
04-04-2005, 3:56 PM
How do I execute scripts in PSCS after copying it to the "Scripts" folder???

Looks very interesting! :)


Under the FILE menu just below Automate is Scripts you have to re-start PS if you had it open when you copied your script to the appropriate folder or use the browse option to navigate to that folder and find the right file.

The script in my post above titled "yellowcopyright.txt" must be renamed with a .js extension for it to work. It will only add the copyright as ED requested and it uses his font so you will have to edit it to change the font name to the one you prefer.

328iGuy
04-04-2005, 3:58 PM
Under the FILE menu just below Automate is Scripts you have to re-start PS if you had it open when you copied your script to the appropriate folder or use the browse option to navigate to that folder and find the right file.

I figured it out earlier, should have updated the post. Works great! :)

328iGuy
04-07-2005, 2:09 PM
For some reason, the board software is adding a space where there shouldn't be one. Change the extension of the attached file to .js instead of .txt and try it - it really should work. Let me know what color you want the background and text and I'll change it for you.



Hmmm.....I have the "Especial Kay" font in my c:\windows\fonts directory yet it doesn't work, still uses Papyrus or whatever as a default I guess?

Should I have the ttf file in another location in order for this script to read it?

Thanks

328iGuy
04-07-2005, 2:27 PM
Just for everyone interested, I figured out how to get different fonts working with these scripts......

To get the Especial Kay font working such as the one Paradise uses as well.....I just put the font name together like this:

TI.font = "EspecialKay";


Works great now! :)

Finz
04-07-2005, 2:39 PM
Sorry, I wasn't able to test it with that font because I don't have that one. The fonts directory is where it belongs. I have noticed on my computer that some fonts don't work with the scripts, I'm beginning to wonder if it is because some of the fonts were installed after Photoshop was installed - it's probably something silly like that.

Finz
04-07-2005, 2:47 PM
Just for everyone interested, I figured out how to get different fonts working with these scripts......

To get the Especial Kay font working such as the one Paradise uses as well.....I just put the font name together like this:

TI.font = "EspecialKay";


Works great now! :)


Thanks, I thought the font name was Especial KEY not KAY.... I'll change the text file.

paradise
04-07-2005, 2:48 PM
Ok, you guys got me back into it, so I sat down and figured out this script (UGH!)

Here is the end result, I added another layer, to put in the description of the series on the other side. I also justified them against the borders (left and right) through trial and error. Another great trick is to take out the last command (flatten) so that you can fix it up.

http://aquatic-photography.com/pics/gardenscript.jpg

Attached, my version of the script:

Finz
04-07-2005, 2:54 PM
Wow - that's cool! Uh did you forget the attachment?

328iGuy
04-07-2005, 3:10 PM
I want a copy! :)

paradise
04-07-2005, 3:29 PM
I thought I did, but then realized just now, it was a JS file, so it did not take it. Invalid type. It's a txt file now. Have fun :-)

Schnauzer
04-07-2005, 4:08 PM
I have been playing with this also and having fun . I changed the background to black and the fonts to yellow . when I go to use it it says yellow undefied .

Also how do you move it to the right ?

I changed the fonts to old english but it didn't change the fonts .

paradise
04-07-2005, 4:31 PM
Ron, compare James' and my files and you will figure it out. It's right there in the code. It's hard for me to explain the code, seriously. I just know what each line does.

You have to define colors if you want to use them, the one I use has yellow and white defined.

To align, you have to take the width of the image, and find where it tells you the start point. So if the width was 600 on this image and the border was 4 pixels, I started the left one at 4 pixels, and the right one at about 430. The 2nd one was a trial/error thing, but I got it where I want it now.

Finz
04-07-2005, 4:35 PM
colors are defined using their RGB values. You can find these using the color picker in photoshop. I defined yellow thusly

var yellow = new SolidColor ();
yellow.rgb.red = 243;
yellow.rgb.green = 255;
yellow.rgb.blue = 58;

In my earlier post where I attempted to post the entire text of a script you will find an explanation of changing text position

Change the number after TI.position = [ to move the text to the right.

Schnauzer
04-07-2005, 4:36 PM
I figured out how to move it but still can't get the yellow fonts . Is their more than one yellow ?

paradise
04-07-2005, 4:39 PM
You can define ANY color by using its rgb values, in photoshop you can use color picker to choose a color then click on that color in the pallette box, and it will have rgb values on the side of it.

Schnauzer
04-07-2005, 4:59 PM
This is what I put and it still came up yellow undefined .
TI.color = yellow.rgb.red = 255, yellow.rgb.green = 255, yellow.rgb.blue = 0;

Finz
04-07-2005, 8:46 PM
copy and paste the text that I posted. don't add and spaces or commas - this text defines the color:

var yellow = new SolidColor ();
yellow.rgb.red = 255;
yellow.rgb.green = 255;
yellow.rgb.blue = 0;


This text tells it what color to use :

TI.color = yellow;

Notice that ,in the script, the variables are defined before the instructions begin.

hir0
05-17-2005, 10:22 AM
sorry to dig this up, but i've been playing with photoshop here at work tonight and learned some easier way of doing things.
this is what i did. i opened the action section and created a new set - then i created an action named *insert font name here*
so it started recording when i hit ok. i went and started my exif script. once it finished, i went back one step in the history box so the layers weren't "merged" and i edited the text colors and fonts the way i liked them - then i merged visible on my layers, and added a slight usm (the script resizes your image and should be re-sharpened afterwards) - then i hit stop on my action. so what did it do? it made running my script a lot easier and it allowed me to use the font i like (which the script did not like) - and i can make as many actions as i want for whatever font or text color i want. as a bonus, it's much easier clicking on an action than browsing for the script i want to run. just keep in mind it is still running the script, so leave the script in whatever directory you currently have it in if you decide to try and make an action for it.

Willy wombat
06-09-2005, 10:06 AM
Im trying to run these scripts but i keep coming up with a copyright date of 2004? I cant figure it out? Also - if you are running CS2 you need to save these files as .jsx for some reason.

hir0
06-09-2005, 10:43 AM
hi WW, the copyright stuff is entered in the script as text. you have to right click on the script, and edit it.

tlemetry
06-09-2005, 1:59 PM
na na na naaaaa naaaaa! now I know who took the tulip pic in the contest! ;)
hehehe
T

paradise
06-09-2005, 5:01 PM
are you sure??? :)

phishphorphun
06-11-2005, 11:41 AM
I know I'm late getting into this script thing, but I need some help.

I have CS7 and Windows XP. I have saved both files. The one hir0 passed on and the one Finz suggested for the CS7 users. I can edit both of them. But I get an Windows error on both when trying to open them.

hir0's copy the error reads:

Windows Script Host
Line: 14
Char: 1
Error: "DialogModes" is undefined
Code: 800A1391
source: Microsoft runtime error


Finz's suggested copy:

Windows Script Error
Line: 31
Char: 1
Error: Syntex Error
Code: 800AC3EA
Source: Microsoft JScript compilation error

Can anybody put me in the right direction to repair this?

Schnauzer
06-11-2005, 12:01 PM
Bobby I e-mailed you something to try .

Finz
06-11-2005, 1:20 PM
All of the advice I got came from the Adobe scripting forum here http://www.adobeforums.com/cgi-bin/webx?13@297.o9bDeSg0tYD.2@.ef7f2cb

phishphorphun
06-11-2005, 1:29 PM
Thanks James, but I couldn't find anything there that addresses my issue.

Finz
06-11-2005, 1:33 PM
You can post questions there, the folks there are very helpful

Ibn
06-11-2005, 3:19 PM
Bobby, if you can either send me the script or post it on the forums, I'm sure one of us will take a look at it and get back to you.

phishphorphun
06-11-2005, 4:03 PM
IBN wrote:
Bobby, if you can either send me the script or post it on the forums, I'm sure one of us will take a look at it and get back to you.

Thanks. It's on the way to you now.

Schnauzer
06-11-2005, 4:46 PM
Bobby did you get the e-mail I sent you ?

phishphorphun
06-11-2005, 4:48 PM
Yeah, thanks Ron. It still isn't working yet. Were you going to send me your copy?

Schnauzer
06-11-2005, 4:55 PM
Yes I sent it , all you had to do was change the name ------I think .

phishphorphun
06-11-2005, 5:07 PM
What a knucklehead. I didn't scroll down the email. I was looking for an attachment. :confused:

BTW, I noticed it is for CS and I have PS7.

I also put a question and posted the other one I had on the Adobe Forum that Finz suggested. I got a reply saying the copy I have has several syntax and typo errors. I don't know how that can happen :confused:

Anyway, I'll try downloading it again directly into PS scripts. I didn't do it that way the first time because I didn't have the script plugin for PS7 first.

I'm starting all over with the one for PS7. If that doesn't work I'll try yours. Or I can put both in the scripts folder I guess.

phishphorphun
06-11-2005, 5:21 PM
Okay, I give up. Tried everything that was suggested. I'll do without.

Thanks to those who tried to help.

paradise
06-11-2005, 6:35 PM
Bobby, I wish I could help you, but PS7 probably has some different language. I dont know the language at all. You can record the script yourself to put in your name and do a frame using macro recorder in PS, but i dont know how to do the exif and format it.

JerseyJay
06-11-2005, 6:50 PM
Bobby,

Check your email !

clippo
11-02-2005, 6:14 AM
Bobby,

Check your email !


I'm using PS7 too - I don't get an option for scripts under the FILE menu.. or anywhere? - have saved a couple of those previous scripts though.. any ideas how to proceed?

Finz
11-02-2005, 9:11 AM
I'm using PS7 too - I don't get an option for scripts under the FILE menu.. or anywhere? - have saved a couple of those previous scripts though.. any ideas how to proceed?

On the first page of this post Ibn tells how to run these scripts in PS7



Hmm...question here for you guys. I downloaded PS 7.0 script plug-in v.1.0.2.a for PS 7.0.1 and tried running the script, but after it's done running, I end up w/a shrunken gray image w/a circular dot in the middle of it...

Also, the path that I took for the script is different. It's not file>script, but rather file>automate>scripts.

On the second page of this thread, I posted a link that provides a PS7 version of the script AND some insight into the differences in scripting language

http://mlkdesign.online.fr/tutorials/scripting/scripting6_1.html

Hope this helps

clippo
11-03-2005, 6:20 AM
On the first page of this post Ibn tells how to run these scripts in PS7

yes I have seen that and downloaded the files - problem is, there is no option for scripts under the FILE menu or anywhere that I can see.

328iGuy
11-03-2005, 8:55 AM
yes I have seen that and downloaded the files - problem is, there is no option for scripts under the FILE menu or anywhere that I can see.

It will probably be displayed on File > Automate :)

clippo
11-03-2005, 2:46 PM
It will probably be displayed on File > Automate :)

nope! - I saw that a couple of pages back. Its not in any menu. Doesn't even come up with a search.

328iGuy
11-03-2005, 2:49 PM
nope! - I saw that a couple of pages back. Its not in any menu. Doesn't even come up with a search.

What version of Photoshop are you running, 7.0?

What folder did you drop the js file into?

Finz
11-03-2005, 8:00 PM
yes I have seen that and downloaded the files - problem is, there is no option for scripts under the FILE menu or anywhere that I can see.

Have you downloaded and installed the Photoshop 7.0 scripting plug-in that Ibn mentioned in the post I quoted?

http://www.adobe.com/support/downloads/detail.jsp?ftpID=1536