#include "l_bitmap.h"
L_LTFIL_API L_INT L_ReadFileMetaDataItems(pszFile, pMetaData, pLoadOptions)
| L_TCHAR * pszFile; | input file name | 
| pL_FILEMETADATAITEMS pMetaData; | pointer to metadata items structure to be filled | 
| pLOADFILEOPTION pLoadOptions; | pointer to optional extended load options | 
Gets all the tags stored in a file.
| Parameter | Description | 
| pszFile | Character string that contains the input file name. | 
| pMetaData | Pointer to a L_FILEMETADATAITEMS structure that will be filled with the metadata items from the source image file. When this data is no longer needed pass it to the L_FreeFileMetaDataItems function to free the allocated memory. | 
| pLoadOptions | Pointer to optional extended load options. Pass NULL to use the default load options. | 
| SUCCESS | The function was successful. | 
| < 1 | An error occurred. Refer to Return Codes. | 
You must free the data allocated with this function using the L_FreeFileMetaDataItems function.
The file referenced by pszFile 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. | 
Win32, x64, Linux.
| Functions: | L_FileMetaDataItemsSupported, L_SaveXMPMetadata, L_ExtractXMPMetadata | 
| Topics: | Raster Image Functions: XMP Metadata | 
This example demonstrates all of the functions related to MetaData items. It check if the file support MetaData, read MetaData items, print MetaDataItems data, then free allocated MetaData items.
L_INT PrintFileMetaData(L_TCHAR* pFileName){L_INT nRet;L_BOOL bIsMetaDataSupported;FILEINFO FileInfo = { 0 };//Get file informationnRet = L_FileInfo(pFileName, &FileInfo, sizeof(FILEINFO), 0, NULL);if(nRet != SUCCESS)return nRet;//Check if MetaData supported for the specified file format.bIsMetaDataSupported = L_FileMetaDataItemsSupported(FileInfo.Format);if(bIsMetaDataSupported){L_FILEMETADATAITEMS MetaDataItems = { 0 };MetaDataItems.uStructSize = sizeof(L_FILEMETADATAITEMS);//Read MetaData ItemsnRet = L_ReadFileMetaDataItems(pFileName, &MetaDataItems, NULL);if(nRet != SUCCESS)return nRet;wprintf(L"Items count %u\n", MetaDataItems.uCount);for(L_UINT i = 0; i < MetaDataItems.uCount; i++){//Print Key & Value for each item in MetaDataItemsconst L_FILEMETADATAITEM* item = &MetaDataItems.pItems[i];//key Ex: L_FILEMETADATAKEY_TITLEwprintf(L"%s: %s\n", item->Key, item->Value);}//Free MetaData ItemsL_FreeFileMetaDataItems(&MetaDataItems);}return SUCCESS;}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
