login about faq
  • Downloaded Chilkat for iOS
  • Took photo on my phone, saved to desktop
  • Opened photo in PS CC 2014 (on mac)
  • Edited file info, adding values to most all fields
  • Save file (Emailed it to support)
  • loaded using below code
  • Use the PS created jpg/xmp file, and CkoXmp can't find "Iptc4xmpCore:CreatorContactInfo" "Iptc4xmpCore:CiTelWork"
  • Use the Chilkat sample jpg and it finds the Iptc4xmpCore:CiTelWork property

Looking at XML extracted using CkoXmp, it's clear that PS CC 2014 is saving the contact info struct as (had to edit it a bit to make it show in this message)

< Iptc4xmpCore:CreatorContactInfo Iptc4xmpCore:CiAdrExtadr="IPTCAddress"
 Iptc4xmpCore:CiAdrCity="IPTCCity" Iptc4xmpCore:CiAdrRegion="IPTCState" 
Iptc4xmpCore:CiAdrPcode="IPTCPostalCode" Iptc4xmpCore:CiAdrCtry="IPTCCountry"
 Iptc4xmpCore:CiTelWork="IPTCPhones&#xD;Phones2"
 Iptc4xmpCore:CiEmailWork="IPTCEmail&#xD;email2" 
Iptc4xmpCore:CiUrlWork="IPTCWebsites&#xD;websites2" / >

  • Can CkoXmp read XMP data generated by Photoshop?

  • Sample Code:

     (void) testChikkatGetStructValue
    {
        CkoXmp *xmp = [[CkoXmp alloc] init];

    NSString *jpgXMPFName = [self filepathWithFilename:@"Sample1-PsXMP.jpg"]; jpgXMPFName = [self filepathWithFilename:@"Chilkat-sample1.jpg"];

    BOOL success;

    success = [xmp UnlockComponent: @"Anything for 30-day trial."]; if (success != YES) { NSLog(@"%@",xmp.LastErrorText); return; }

    success = [xmp LoadAppFile:jpgXMPFName]; if (success != YES) { NSLog(@"%@",xmp.LastErrorText); return; } NSLog(@"Extracting XMP from %@", jpgXMPFName); NSLog(@" %@%d",@"Num embedded XMP docs: ",[xmp.NumEmbedded intValue]);

    CkoXml *xml = 0; xml = [xmp GetEmbedded: [NSNumber numberWithInt: 0]];

    if (xml == nil) { NSLog(@"%@",xmp.LastErrorText); return; } else {

    // Log some values from the jpg's xmp data
    
    NSString *xmlParseLog = [self filepathWithFilename:@"xmlLog.txt"];
    xmp.VerboseLogging = YES;
    xml.VerboseLogging = YES;
    xml.DebugLogFilePath = xmlParseLog;
    
    NSString *propVal;
    propVal = [xmp GetStructValue: xml structName: @"Iptc4xmpCore:CreatorContactInfo" propName: @"Iptc4xmpCore:CiTelWork"];
    if (propVal == nil ) {
        NSLog(@"%@",@" property Not found.");
        NSLog(@"TEXT={{{%@}}}", xmp.LastErrorText);
    }
    else {
        NSLog(@"%@",propVal);
    }
    

    } }

asked Mar 14 '15 at 12:06

kryptomanic's gravatar image

kryptomanic
11

edited Mar 14 '15 at 12:07


I'll have a look as soon as possible -- but it may not be until late Monday or Tuesday. I have a feeling it has to do with this (from the XMP specification)

NOTE Many XMP processors use a more concise notation for structure values as described in
7.9.2.3, “rdf:parseType="Resource" attribute”.

PS> The XMP API conceptually offers two things:

  1. The ability to extract XMP from JPG's and TIFF's, and the ability to add/modify XMP's to JPG's and TIFF's.
  2. A set of convenience methods to simplify the read/write/modify of XMP data. However, XMP is just a specific application of XML. Th XMP for reading/writing/modifying XMP docs are just higher-level wrappers that essentially use Chilkat XML internally. Anything not provided directly via the XMP API can be accomplished with the lower-level Chilkat XML API.
link

answered Mar 14 '15 at 16:15

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×59
×10
×3

Asked: Mar 14 '15 at 12:06

Seen: 1,222 times

Last updated: Mar 14 '15 at 16:15

powered by OSQA