Hi Sunil,
that seems to be the solution. Again: Thank you very much! The final code:
QStringXmpParser::getXmpContent(QStringfilePath)
{
try{
XMP_VersionInfocoreVersion;
SXMPMeta::GetVersionInfo(&coreVersion);
std::stringxmpContent;
XMP_OptionBitsopts=kXMPFiles_OpenForRead|kXMPFiles_OpenUsePacketScanning;
QByteArrayba=filePath.toLocal8Bit();
constchar*c_str_FileName=ba.data();
XMP_StringPtrfilenamePtr=c_str_FileName;
SXMPFilesmyfile;
if(!myfile.OpenFile(filenamePtr,kXMP_UnknownFile,opts)){
qDebug()<<"FailedtoopenSXMPFilefor"<<filePath;
}
if(!myfile.GetXMP(NULL,&xmpContent)){
qDebug()<<"NoXMPdatainfile"<<filePath;
}
returnQString::fromStdString(xmpContent.c_str());
}catch(XMP_Error&e){
qDebug()<<"Exception:"<<e.GetErrMsg();
return"";
}
}
Cheers,
dersmon