How to retrieve the "Title" field from Lightroom on a JPEG using ImageMagick?

32 views Asked by At

I am putting Title & Caption onto my photos in Lightroom, then exporting them as JPEG. Later in my workflow I am using ImageMagick (through a .NET library) to process these images. I can retrieve the EXIF Profile and get the caption from the "ImageDescription" tag, but I can't seem to find the Title in there anywhere. Does anyone know where Lightroom puts the Title into the image data?

I looked through all 49 EXIF values, but none contained the string I put in for Title. Caption was present though, along with everything else I expected (lens info, date, camera, copyright).

1

There are 1 answers

0
Mark Setchell On BEST ANSWER

I grabbed an image and added a title (MUPPETRY) and description (PUPPETRY) in Adobe Lightroom using the metadata panel like this and then exported as JPEG:

enter image description here

In case you are wondering, I chose silly names for near certain uniqueness.


It seems that Lightroom puts the title and caption in the IPTC section. You can tell that by using:

exiftool -G0 export.jpg | grep UPPETRY    
[EXIF]          Image Description               : PUPPETRY
[IPTC]          Object Name                     : MUPPETRY
[IPTC]          Caption-Abstract                : PUPPETRY
[XMP]           Title                           : MUPPETRY
[XMP]           Description                     : PUPPETRY

On Windows, use FINDSTR instead of grep.

You can extract them with exiftool like this:

exiftool -IPTC:Caption-Abstract -IPTC:ObjectName export.jpg
Caption-Abstract                : PUPPETRY
Object Name                     : MUPPETRY

Or, more succinctly:

exiftool -Title -Description export.jpg 
Title                           : MUPPETRY
Description                     : PUPPETRY

Or, if you just want the value in a bash variable, use the -short option like this:

title=$(exiftool -s3 -Title export.jpg)
echo $title
MUPPETRY

If you want to see IPTC metadata with ImageMagick, use this to discover all the data:

magick export.jpg IPTCTEXT:-   
        
1#90#City="%G"
2#0="�"
2#5#Image Name="MUPPETRY"
2#120#Caption="PUPPETRY"

You can then see the field numbers of the ones you want and extract just those:

identify -format "%[IPTC:2:5]" export.jpg
MUPPETRY

identify -format "%[IPTC:2:120]" export.jpg
PUPPETRY