ITPC4xmpExt supported?
-
Hi, I’d like to know if it is possible to develop mappings for the extension keywords, such as Event, Genre, LocationShown, etc. How would I do so?
I haven’t been able to emulate the logic in wp_read_image_metadata that uses iptcparse.
-
Thanks for your question. It should be possible to develop IPTC/EXIF mapping rules for the keywords you’ve listed. It would be a great help if you can post a link to one or more of the images containing the keywords so I can analyze them and see just how they are represented in the metadata. IF that’s not possible, you can give me your contact information and I will send you an email address you can use to send some example images to me. You can use the Contact Us page at our web site:
I look forward to seeing some examples or hearing from you. Thanks for your interest in the plugin.
Cool. I solved some of this puzzle by doing your caption trick with this magic key:
[mla_gallery attachment_tag=”Panoche” mla_caption=”{+xmp:Iptc4xmpCore.IntellectualGenre+}”]. Found the “magic” key by looking at the Photoshop raw data panel of the File Info.Here’s a link to the published image … this is my “junk” site where I do experiments, so nothing is organized 🙂
ImageHosting page:
PageHowever, I am having difficulty getting access to fields inside structured data, such as LocationCreated … The ‘.’ notation isn’t working, and when I look at the raw xmp data in photoshop, I see one or more subcontainers around the fields I want to access.
Wes
Followup: {+xmp:Iptc4xmpCore.0.Sublocation+} does what I want …. anonymous nested structure, I guess. PHP is so un-wonderful.
Thanks for the links to your example image and for all the testing and experimenting you’ve done. It’s not entirely fair to blame PHP, since all of the code required to parse out the XMP data is mine and mine alone, i.e., code within the MLA plugin.
The best way to find the “magic keys” is to start with something like this in your
mla_caption:mla_caption="{+xmp:Iptc4xmpCore,export+}"ormla_caption="{+xmp:Iptc4xmpExt,export+}"The
,exportformat option will dump the entire sub-structure showing how MLA has parsed it. For your example this yields:Iptc4xmpCore
array ( ‘Copyright’ => ‘Wes Mitchell’, ‘Caption’ => ‘photos from Panoche Hills’, ‘Location’ => ‘Panoche Hills’, ‘IntellectualGenre’ => ‘astrophotography’, ‘CreatorContactInfo’ => array ( ‘CiEmailWork’ => ‘wesm@xxxxxxxxxxxxx.net’, ‘CiUrlWork’ => ‘http://dancinglight.photos’, ), ‘Scene’ => array ( 0 => ‘011100’, ), ‘SubjectCode’ => array ( 0 => ‘01000000’, ), )
and
Iptc4xmpExt
array ( ‘PersonInImage’ => array ( 0 => ‘NOBODY’, ), ‘LocationCreated’ => array ( 0 => array ( ‘Sublocation’ => ‘Panoche Hills Recreation Area’, ‘City’ => ”, ‘ProvinceState’ => ‘California’, ‘CountryName’ => ‘US’, ‘CountryCode’ => ‘USA’, ‘WorldRegion’ => ”, ), ), ‘LocationShown’ => array ( 0 => array ( ‘Sublocation’ => ‘Panoche Hills Recreation Area’, ‘City’ => ”, ‘ProvinceState’ => ‘California’, ‘CountryName’ => ‘US’, ‘CountryCode’ => ‘USA’, ‘WorldRegion’ => ”, ), ), ‘Event’ => array ( 0 => ‘EVENT’, ), )
Your followup example did not work for me, but I had luck with this variation:
{+xmp:Iptc4xmpExt.LocationCreated.0.Sublocation+}Does all that make sense?
Yes, thanks, that was a typo. I meant xmp:Iptc4xmpExt.LocationCreated.0.Sublocation
Close this ticket if you like.Thanks for confirming what syntax works for you.
I am marking this topic resolved, but please update it if you have any problems or further questions regarding XMP metadata extraction using MLA.
The topic ‘ITPC4xmpExt supported?’ is closed to new replies.