Getty Personality, php command line update ...

Started by WhyRegister, May 02, 2022, 12:49:09 PM

Previous topic - Next topic

WhyRegister

When I hexdump the image file, I see Iptc4core and Personality data that I entered with PhotoMechanic.
I try to update the JPG with:
exec('exiftool -xmp-getty:Personality="SplatterMMM" IPTC_20200725143.jpg', $output, $returnCode);   I see -getty as a group, but ...
Or
exec('exiftool -xmp-Iptc4xmpCore:Personality="SplatterOOO" IPTC_20200725143.jpg', $output, $returnCode);
Or
exec('exiftool -xmp-GettyImagesGIFT:Personality="SplatterXXX" IPTC_20200725143.jpg', $output, $returnCode);
All fail. Or the update may occur, but when I view the IPTC in PhotoMechanic the Personality field is not changed or not valued.
Two questions:
A. What is the command to update the Getty Personality using PHP command? Change my command rather than typing in a brand new one, which is too generic.
B. If exiftool not installed on my host, then can I have PHP execute a Perl script and the Perl script accesses/uses the exiftool library? I would copy the exiftool library (Remember I can't install. I don't have permissions/access). Then write a simple script taking parameters from the PHP exec()?
I have done IPTC changes uses the exiftool, but when I review the image in PhotoMechanic I don't see the changes.

From the hexdump, I can only grab the translated section (no linefeeds):
Info>.         <
GettyImagesGIFT:
Personality>.   
         <rdf:Se
q>.             
  <rdf:li>item 3
6 UPDATE</rdf:li
>.            </
rdf:Seq>.       
  </GettyImagesG
IFT:Personality>

.      </rdf:Des
cription>.   </r
df:RDF>.</x:xmpm
eta>.           

StarGeek

Don't try to figure out the name of a tag from other programs or hex dumps.  Use the command in FAQ #3.  Then make sure your command works properly on the command line before trying to call it from another program.

C:\>exiftool -P -overwrite_original -XMP:Personality="John Smith" -api compact=1 y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.41
[XMP-getty]     Personality                     : John Smith

C:\>exiftool -b -xmp y:\!temp\Test4.jpg
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.41'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
  xmlns:GettyImagesGIFT='http://xmp.gettyimages.com/gift/1.0/'>
  <GettyImagesGIFT:Personality>
   <rdf:Bag>
    <rdf:li>John Smith</rdf:li>
   </rdf:Bag>
  </GettyImagesGIFT:Personality>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>
C:\>


As for the data not showing up in PhotoMechanic, you probably have to look for a "Reload Metadata" command.  You're making a change to the metadata outside of PhotoMechanic and it won't know about it unless up tell it to update the data.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype