Is this page helpful?

In this page

L_GetComment

Summary

Gets a current field that is ready to be saved as a comment in a file. This lets you see the field that was specified with the L_SetComment function.

Syntax

#include "l_bitmap.h"

L_LTFIL_API L_INT L_GetComment(uType, pComment, uLength)

Parameters

L_UINT uType

The type of comment. Refer to Types of File Comments.

L_UCHAR* pComment

Pointer to your buffer that will hold the comment field. You can pass NULL if you only want to get the length of the field (the return value).

L_UINT uLength

The size of your buffer that will hold the comment field.

Returns

Value Meaning
>=0 Length of the comment field.
< 0 An error occurred. Refer to Return Codes.

Comments

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. When you save a file, the comments, which LEADTOOLS maintains in a global array are saved in the file. The index into the array (specified using a constant) determines the type of comment, as described in Types of File Comments.

Before saving a file, you use the L_SetComment function to specify the comments to be saved.

The L_GetComment function lets you get any of the current comments that are ready to be saved, for example, if you want to let the user review the comments before saving a file. Before getting a comment, you must allocate a buffer for the field. If you do not know how big the buffer needs to be, you can call this function twice: the first time to get the length of the field (the return value), and the second time to actually get the field.

The L_ReadFileComment function lets you read comments that are already saved in a file header. For more information refer to the L_SetComment function.

Note: More options are available in the LOADFILEOPTION structure.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

For an example, refer to L_SetComment.

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.