Skip to main content
Participating Frequently
September 1, 2018
Question

Automate a process

  • September 1, 2018
  • 2 replies
  • 5928 views

So I'm trying to use Photoshop to add a number and a date in about 180 images, but I don't want to go through each one individually to add each line of text. I'm making a time lapse of myself and how I changed over 180 days (an example of this would be that I shaved my hair and I'm posting a video showing the regrowth of it over 180 days. Not what I actually did but it is similar, and you can find many videos like this on YouTube demonstrating what I'm trying to do), and I'd like to add the date for each photo I took, and what day it was in the process (i.e. day 1, day 2, day 37, day 180). I'm new to Photoshop, so I don't know much about the program, but I know there's a batch command somewhere; I wasn't able to find a tutorial anywhere on the specific thing I'm trying to do though. How could I add the specific day and date for each photo while not having to go through all of them individually?

This topic has been closed for replies.

2 replies

Kukurykus
Brainiac
September 4, 2018

I wrote a script that put on image (but in down right corner) a date writen to metadata. It's also not on white background: Re: Way to have the "create just date " to print into photo? / Here is also rewriten version for your specific expectation:

displayDialogs = DialogModes.NO, preferences.rulerUnits = Units.PIXELS;

(aD = activeDocument).artLayers.add().kind = LayerKind.TEXT

d = aD.info.creationDate.replace(/(\d{4})(\d{2})(\d{2})/,

function(_, v1, v2, v3, v4) {return v3 + '.' + v2 + '.' + v1})

s = aD.height / 100 * 5 * 72 / aD.resolution;

(tI = aD.activeLayer.textItem).contents = d

tI.position = [85, 170], col = new SolidColor

col.rgb.hexValue = 'FFFFFF'

tI.color = col, tI.size =  s

Try it on single layer if you know how to use this script, then it can be automated for all 180 layers. Also post your video

Stephen Marsh
Adobe Expert
September 5, 2018

Haha, you should see how many lines of code my hack contains, and you did it in 9!

I can’t figure out how to replace info.creationDate in line 3 to the filename.

Kukurykus
Brainiac
September 5, 2018

Change 3rd&4th lines to d = aD.name. I didn't make pattern to position for each resolution, so most appropriate now is 300.

Stephen Marsh
Adobe Expert
September 2, 2018

There are scripts to add the filename and or time/date stamp to the image (or EXIF metadata etc). So if you were willing to batch rename the filename to be Day 1, Day 2 etc… And if you could pull the date/time metadata out of each file, then this should be possible. Try searching in the scripting sub-forum.

how put exif data on a photo?

Otherwise, I would suggest that you look into Photoshop Variables. It should be “simple enough” to create a spreadsheet with a column for the Day 1 text and a column for the date. This could then be used to add text to each image.

Creating data-driven graphics in Photoshop

Stephen Marsh
Adobe Expert
September 2, 2018

Here I have used Adobe Bridge to batch rename a series of images. Each image was shot on a different day. I sorted the view by date created in Bridge. The critical point is that the sort order in Bridge is used as the input order for the batch rename command. The rename used a static text of “Day “ with a space, then it used an increment number padded with two zeros.

The filename would be picked up by a script, the script would also look for the date created metadata entry in the file as well. Both of these options would then be added as a text layer to the image.

Here is a rough sample of the output of a script (JJ Mack’s StampExif.jsx) where I removed all of the variables, except for filename and date. Further tweaks may be required, such as removing filename extension or changing date format, or the font size, colour etc. This is simply a proof of concept.

Stephen Marsh
Adobe Expert
September 2, 2018

Thank you, but I'm still confused on the actions. I was able to rename all my files so now all i need to do is add the filename (and nothing else, i.e. no copyright marks, original dates, or camera lenses) to the photo. I saw stuff about this in one of your linked questions, how to add exif data, but there was so much information I didn't need, and I was somewhat confused by the process of doing it. How do I edit the script file so it only shows the file name without the file extension in the top corner or something like that? I saw JJMack answer a question similar to this but he didn't explain exactly how to edit specific parts of the text on the photo, he kind of just grouped it. The batch renaming the files was really helpful, all I need to do now is just add the file name of each photo to the actual photo, which is what I'm trying to figure out.


Filename only:

http://blogs.adobe.com/jkost/2010/09/add-file-name-as-text-layer.html

or

https://tejwani.com/photoshop-script-insert-current-filename/

Prepression: Downloading and Installing Adobe Scripts

I’ll post more later on the action and batch.