If you’re old enough, you will know that old pictures (I mean, roll-film pictures) normally come with timestamp at the bottom right corner.
Well, timestamp within the picture is no longer a common thing in the world of Digital Photography. I welcomed the change. For me, having a permanent timestamp in a picture is like having a hardcoding in your program – it just makes things harder to edit / reuse.
Yet, apparently, the timestamp thingy is a BIG thing for mum and dad T_T I have been printing our holiday pictures for couple of years now… and they always gave the same comments “They are nice… but… where is the TIMESTAMP??”. This year, I remember and decide to timestamp my photos before sending them for printing.
One brainless way to timestamp is to right click on you photo, look at its metadata to find the date creation, open the paint program, add the date, save it back, and send it for printing. It sounds ok for one pic. But for 240 pictures? I don’t even want to imagine it.
I went to web to find some easy way to do it. To my surprise, there are not many well-defined methods! (Or my search power has degenerated?) I was kind of hoping that “Automator” would be able to do it, but apparently…. Not without some plugin and shell scripting.
Luckily, Photoshop didn’t disappoint me. Javascript + Action + Automate solve my 240 pictures issues within 5 minutes :D Credit goes to Retouch Pro Forum, member Csuebele!
For convenience sake (and my future reference), let me paste the Javascript here:
Step by Step:
1. Save the above as timestamp.jsx
2. Start your Photoshop. Open one of the pic you want to timestamp
3. Create an action (Windows: Actions: Create New Set: Create New Action)
4. Press the record button to start recording
5. Go to File > Scripts > Browse > timestamp.jsx
6. Optional: Do further enhancement to the timestamp to make it readable. For me, I add white stroke 7. Press the stop button
8. Go to File > Automate
9. Select the folder of pictures you want to timestamp, then select the action you just recorded.
10. I’m done!! :D
Now all I have to do is to save my pics to thumb drive and show them off to my parents next week. Fufufu. I’m actually thankful to them. It has been a while since I tried to automate anything. This has helped me to realize that even though I haven’t been doing programming for the last 4 years, I’m still a lazy geek, deep within.
ED
Well, timestamp within the picture is no longer a common thing in the world of Digital Photography. I welcomed the change. For me, having a permanent timestamp in a picture is like having a hardcoding in your program – it just makes things harder to edit / reuse.
Yet, apparently, the timestamp thingy is a BIG thing for mum and dad T_T I have been printing our holiday pictures for couple of years now… and they always gave the same comments “They are nice… but… where is the TIMESTAMP??”. This year, I remember and decide to timestamp my photos before sending them for printing.
One brainless way to timestamp is to right click on you photo, look at its metadata to find the date creation, open the paint program, add the date, save it back, and send it for printing. It sounds ok for one pic. But for 240 pictures? I don’t even want to imagine it.
I went to web to find some easy way to do it. To my surprise, there are not many well-defined methods! (Or my search power has degenerated?) I was kind of hoping that “Automator” would be able to do it, but apparently…. Not without some plugin and shell scripting.
Luckily, Photoshop didn’t disappoint me. Javascript + Action + Automate solve my 240 pictures issues within 5 minutes :D Credit goes to Retouch Pro Forum, member Csuebele!
For convenience sake (and my future reference), let me paste the Javascript here:
target = app.photoshop
var oldPref = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS;
var docRef = activeDocument
var dw = docRef.width
var dh = docRef.height
//Change the last numbers to adjust where text is placed.--------------------------
var inW = dw * .98
var inH = dh * .98
//-----------------------------------------------------------------------------------------------------
var dateString = ''
var timeDate = ''
for (var i = 0; i <docRef.info.exif.length; i++)
{
dateString = docRef.info.exif[i].toString()
if (dateString.substring(0,18) == 'Date Time Original')
{
timeDate = dateString.substring(27,29) + '-' + dateString.substring(24,26) + '-' + dateString.substring(19,23) + ' ' + dateString.substring(30,35)
}
}
var artLayerRef = docRef.artLayers.add()
artLayerRef.kind = LayerKind.TEXT
var textItemRef = artLayerRef.textItem
textItemRef.position = [inW,inH]
//else {textItemRef.position = [2240,3100]}
textItemRef.justification = Justification.RIGHT
textItemRef.size = 40
textItemRef.contents = timeDate
artLayerRef.name = 'file date'
app.preferences.rulerUnits = oldPref
Step by Step:
1. Save the above as timestamp.jsx
2. Start your Photoshop. Open one of the pic you want to timestamp
3. Create an action (Windows: Actions: Create New Set: Create New Action)
4. Press the record button to start recording
5. Go to File > Scripts > Browse > timestamp.jsx
6. Optional: Do further enhancement to the timestamp to make it readable. For me, I add white stroke 7. Press the stop button
8. Go to File > Automate
9. Select the folder of pictures you want to timestamp, then select the action you just recorded.
10. I’m done!! :D
Now all I have to do is to save my pics to thumb drive and show them off to my parents next week. Fufufu. I’m actually thankful to them. It has been a while since I tried to automate anything. This has helped me to realize that even though I haven’t been doing programming for the last 4 years, I’m still a lazy geek, deep within.
ED
0 comments:
Post a Comment