L_SaveXMPMetadata

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SaveXMPMetadata(pszXmlSrc, pszDst)

L_TCHAR* pszXmlSrc;

XML source file name

L_TCHAR* pszDst;

output file name

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

Parameter

Description

pszXmlSrc Character string containing the name of the XML source file that contains the XMP metadata.
pszDst Character string containing the name of the destination image file to which the metadata will be saved.

Returns

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

LTFIL
LFXMP
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64, Linux.

See Also
Functions: L_FileMetaDataItemsSupported, L_ExtractXMPMetadata, L_ReadFileMetaDataItems
Topics: Raster Image Functions: XMP Metadata

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help