Author Topic: Exiftool only extracts the first 32 characters of IPTC field  (Read 1470 times)

sripvk1234

  • Newbie
  • *
  • Posts: 4
I have tried extracting metadata for the attached sample file. For one of the IPTC filed Credit/Credit Line i have the original value as "Alejandra Velez for the Getty Conservation Institute", but after extracting with exiftool the value is getting truncated and the value is extracted as "Alejandra Velez for the Getty Co" i.e, only the first 32 characters are retrieved.

Is there is a way in exiftool to ignore the 32-character limit? Do we require to pass any extra parameters while executing the command?

Exiftool version : 10.48
Command Used : exiftool <image> > C:\exifoutput.txt

Please find the image file and output file in the below location:
https://drive.google.com/drive/folders/16y8X7JtAbbVbUirucbkaKpHXMoojcsCJ?usp=sharing


Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: Exiftool only extracts the first 32 characters of IPTC field
« Reply #1 on: July 11, 2018, 08:39:35 AM »
exiftool -credit -G -a SRP_WrkSh1.tiff
Code: [Select]
[XMP]           Credit                          : Alejandra Velez for the Getty Conservation Institute
[IPTC]          Credit                          : Alejandra Velez for the Getty Co

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: Exiftool only extracts the first 32 characters of IPTC field
« Reply #2 on: July 11, 2018, 08:42:07 AM »
Running strings on your file indicates to me that the data in the iptc tag is truncated in the file itself rather than in the output.

cellini:temp alan$ strings SRP_WrkSh1.tiff | grep -i Velez
Code: [Select]
   photoshop:Credit="Alejandra Velez for the Getty Conservation Institute">
     <rdf:li>Alejandra Velez</rdf:li>
Alejandra Velez
Alejandra Velez
 Alejandra Velez for the Getty Co

ryerman

  • Sr. Member
  • ****
  • Posts: 132
Re: Exiftool only extracts the first 32 characters of IPTC field
« Reply #3 on: July 11, 2018, 12:47:34 PM »
Is there is a way in exiftool to ignore the 32-character limit? Do we require to pass any extra parameters while executing the command?
To see all the tags, use this:
exiftool -a -G1 -s  <image> > C:\exifoutput.txt
See here: https://exiftool.org/faq.html#Q3

To ignore the IPTC length limit when writing to a file, use the -m option:
exiftool -m "-IPTC:Credit=lots of characters" <image>
Windows 10 Home 64 bit, Exiftool v11.86

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3774
Re: Exiftool only extracts the first 32 characters of IPTC field
« Reply #4 on: July 11, 2018, 01:41:56 PM »
The IPTC tag specification defining Credit give it a 32 character limit (see IPTC tags).  As ryerman said, you can override this with the -m option.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.