Question:
I am very new to this lib and want to ask few questions:
I tried to get XMP data like: CkXmp xmp;
bool success;
success = xmp.LoadAppFile("C:\\Users\\User\\Downloads\\sample1.jpg");
CkXml *xml = 0;
xml = xmp.GetEmbedded(0);
if (!(xml == 0))
{
StringSet(temporary_string, "Failed!");
success = xml->SaveXml("xmpMetaData.xml");
}
delete xml;
But the result was empty since xmp.get_NumEmbedded() = 0. Why? What am I doing wrong?
Thanks much!!
Mikayel,
Chilkat XMP does not support EXIF tags. :(
The AddNsMapping can be used to add namespaces (domains) that are not automatically hard-coded within Chilkat XMP. The ones that are hard coded are:
"dc" -- "http://purl.org/dc/elements/1.1/" "xmpPLUS" -- "http://ns.adobe.com/xap/1.0/PLUS/" "MicrosoftPhoto" -- "http://ns.microsoft.com/photo/1.0/" "Iptc4xmpCore" -- "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" "exif" -- "http://ns.adobe.com/exif/1.0/" "pdf" -- "http://ns.adobe.com/pdf/1.3/" "photoshop" -- "http://ns.adobe.com/photoshop/1.0/" "tiff" -- "http://ns.adobe.com/tiff/1.0/" "xap" -- "http://ns.adobe.com/xap/1.0/" "stRef" -- "http://ns.adobe.com/xap/1.0/sType/ResourceRef" "xapMM"/"xmpMM" -- "http://ns.adobe.com/xap/1.0/mm/" "xapRights" -- "http://ns.adobe.com/xap/1.0/rights/" "xmp" -- "http://ns.adobe.com/xap/1.0/" "xmpBJ" -- "http://ns.adobe.com/xap/1.0/bj/" "xmpTPg" -- "http://ns.adobe.com/xap/1.0/t/pg/" "xmpDM" -- "http://ns.adobe.com/xmp/1.0/DynamicMedia/" "xmpRights" -- "http://ns.adobe.com/xap/1.0/rights/" "crs" -- "http://ns.adobe.com/camera-rawsettings/1.0/" "aux" -- "http://ns.adobe.com/exif/1.0/aux/"
If get_NumEmbedded did not return the expected count, then turn on verbose logging by setting the VerboseLogging property = true (xmp.put_VerboseLogging(true)), make sure you're using the latest version of Chilkat, which is v9.5.0.47 right now, and examine the LastErrorText after the call to LoadAppFile so you can see the internals/details of the JPG parsing.