L_SaveXMPMetadata

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SaveXMPMetadata(pszXmlSrc, pszDst)

Saves all XMP metadata from the source XML file to the destination image file.

Parameters

L_TCHAR* pszXmlSrc

Character string containing the name of the XML source file that contains the XMP metadata.

L_TCHAR* pszDst

Character string containing the name of the destination image file to which the metadata will be saved.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The file referenced by pszXmlSrc must contain valid XMP data.

The file referenced by pszDst must be a file format that supports XMP. For example PNG, PDF, JPEG, TIFF and SVG.

To determine if a file format supports XMP, use L_FileMetaDataItemsSupported.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example demonstrates all of the functions related to XMP MetaData. It extract XMP MetaData from a source file to a XML file, then add/update XMP MetaData to a destination file using XML MetaData file.

L_INT SaveXMPMetadata(L_TCHAR* pSrcFile, L_TCHAR* pXmlFile, L_TCHAR* pDstFile) 
{ 
   L_INT nRet; 
 
   //Extract XMP MetaData & save it to a XML file. 
   nRet = L_ExtractXMPMetadata(pSrcFile, pXmlFile); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* 
   Add/Update MetaData in the XML file using any XML parser(if needed). 
   */ 
 
   //Save XMP MetaData to a destination file using XML file that contains XMP MetaData. 
   nRet = L_SaveXMPMetadata(pXmlFile, pDstFile); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 20.0.2019.12.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help