L_ReadFileComments

Summary

Gets all the comment fields stored in a file.

Syntax

#include "l_bitmap.h"

L_LTFIL_API L_INT L_ReadFileComments(pszFile, uFlags, puCommentCount, ppComments, puDataSize, ppData, pLoadOptions)

Parameters

L_TCHAR * pszFile

Character string that contains the input file name.

L_UINT uFlags

Flag that determines whether to read the tag overall data. You can combine values when appropriate by using a bitwise OR ( | ):

Flag Meaning
READFILEMETADATA_NOMEMORY [0x01] Do not read the tag overall data. If this flag is set, then puDataSize and ppData will not be used and the function will not read the comment overall data.

L_UINT* puCommentCount

Address of the variable to be updated with the number of comments found in the file.

pLEADFILECOMMENT * ppComments

Pointer to an array of LEADFILECOMMENT structures. Each element of the array contains data for one comment field found in the file. The number of elements in ppComments is puCommentCount. When this array is no longer needed pass it to the L_FreeFileComments function to free the allocated memory.

L_SIZE_T* puDataSize

Address of the variable to be updated with the size in bytes of the overall comment field's data.

L_UCHAR** ppData

Address of the variable to be updated with a pointer to the overall comment fields data. The size of this pointer in bytes is puDataSize. Each LEADFILECOMMENT item found contains an offset to where the data for this item is stored in ppData.

pLOADFILEOPTION pLoadOptions

Pointer to optional extended load options. Pass NULL to use the default load options.

Returns

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

Comments

You must free the data allocated with this function using the L_FreeFileComments function.

If an error occurred in reading all file comments, then no comments will be returned, and the user is responsible to find the valid metadata in the file.

For general information about TIFF tags, refer to Implementing TIFF Comments and Tags.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

For an example, refer to L_ReadFileTags.

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.