Skip to main content
sjwhittman
Participant
April 27, 2018
Question

Automate File Info Metadata extractions in Photoshop

  • April 27, 2018
  • 3 replies
  • 2787 views

I'd like to take a collection of photographs and extract the same descriptive piece of metadata from IPTC (photoshop file->file info) for each photo, create a Text layer, copy the info to it, and then save as a JPG as a means of creating titles for each photo.

I can do this on an individual photo but have not been able to find a way to batch up this process as no "Actions" are capable of recording the events of "opening the file, file info MENU, selecting the IPTC data component, and copying & pasting the data into the Text layer.

[Moved to Photoshop Scripting Forum by Mod]

This topic has been closed for replies.

3 replies

Participant
March 7, 2019

Our organization had over 350K records in PDF, Word, Image and other. We needed a way to ingest each record, to scan the content of each, and auto apply metadata (and keywords) against items found within the contents. Centralpoint by Oxcyon allowed us to do this, auto applying very specific (N-tiered, Treeview Taxonomy (or Metadata) as each record was imported. Centralpoint's Data Transfer routine (which can be scheduled to run periodically against any source) was used, which supports File Folders, SQL, Oracle, ODBC, XML, Json, Excel and more. For files which are auto-ingested by Centralpoint (like Word, XLS, PDF and PPT), we are able to glean the entire contents of 'each' document (this is how the contents get gleaned to apply the appropriate taxonomy for each record), resulting in completely search-able (PDF and Word). This led to our organization (37K employees) completely migrating from Sharepoint, as the records (still securely protected, via Centralpoint's AD/SAML integration) are searched by each user based on their role. The contents of each record can also be leveraged when user's provide a keyword search, so that as they type, (Centralpoint searches the contents of each file ingested), to auto suggest the right match (not just based on the title of the document), but on it's contents! Video found here: https://www.oxcyon.com/centralpoint-dxp/our-thoughts/autoapply-metadata-to-structured-unstructured-data-16

Chuck Uebele
Community Expert
Community Expert
April 28, 2018

You can use this script to put the info in the description field into a text layer. Of course, you would want to change the script to format the size of the font, and the position.

#target photoshop

var doc = activeDocument;

var txtLayer = doc.artLayers.add()

txtLayer.kind = LayerKind.TEXT;

var textItemRef = txtLayer.textItem;

txtLayer.position = [100,100];

textItemRef.contents= doc.info.caption

textItemRef.size=50

Participant
May 8, 2020

Hi, how could I extract data from exif file (eg. date, time, focal lenght) to text layer. Is there something like doc.info.exif [date]? I was trying a few different things, I typed :

 

textItemRef.contents= doc.info.exif[]

 

all I got is text "Array".

Participant
May 8, 2020

ok, I've figured it out: 

 

textItemRef.contents= doc.info.exif[i][j];

 

i - number of records in exif file, can vary between different cameras, each record has 2 "j" values: 0 and 1 (eg. 0 - Make, 1 - Nikon ; 0 - ISO, 1 - 800) 

Abambo
Community Expert
Community Expert
April 28, 2018

May be you should try Javascript?

The scripting subforum may be of help.

ABAMBO | Hard- and Software Engineer | Photographer