Skip navigation
Currently Being Moderated

Not able to get xmp session buffer

Apr 1, 2013 6:54 PM

Here is the code I am using as first stem in an effort to manipulate xmp data in ai file.


const char *xmpin=0;



AIXMPSession xmpsess=0;

sAIAssetMgmt->CreateXMPSession(xmpin, &xmpsess);


int xmpBufSize=0;

sAIAssetMgmt->GetXMPSessionSize(xmpsess, &xmpBufSize);


char *xmpout=new char[xmpBufSize];


sAIAssetMgmt->GetXMPSessionBuffer(xmpsess, xmpout);


xmpin is ok, gets xmp data from current document. Looks like no errors thrown, am not getting any output. xmpBufSize is always zero and xmpout is empty. Help please!


BTW, the doc says the above xmp apis are deprecated. But still it should work, right?






CreateXMPSession is failing. Any idea?


edit 2:


Looks like xmpsession related apis don't work - according to doc, they are deprecated. But GetDocumentXAP and SetDocumentXAP works. So we can modify xmp data using third party xml parsing library, then save it back. no need of xmpsession apis.


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points