Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LFileSettings::GetComment

Show in webframe

#include "ltwrappr.h"

static L_INT LFileSettings::GetComment(uType, pComment, uLength)

L_UINT uType;

/* type of comment */

L_UCHAR * pComment;

/* pointer to the target buffer */

L_UINT uLength;

/* size of the target buffer */

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 LFileSettings::SetComment function.

Parameter

Description

uType

The type of comment. For a list of available types, refer to Types of File Comments.

pComment

Pointer to the 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).

uLength

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

Returns

>=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 LFileSettings::SetComment function to specify the comments to be saved.

The LFileSettings::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 LFile::ReadComment function lets you read comments that are already saved in a file header. For more information refer to the LFileSettings::SetComment function.

Note:

More options are available in the LOADFILEOPTION structure.

Required DLLs and Libraries

LTFIL

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.

See Also

Functions:

LFile::GetInfo, LMemoryFile::GetInfo, LFile::ReadComment, LMemoryFile::ReadComment, LFileSettings::GetPCDResolution, LFileSettings::SetPCDResolution, LFileSettings::GetWMFResolution, LFileSettings::SetWMFResolution, LFileSettings::SetExtFileOption, LFileSettings::SetComment, LFileSettings::GetWMFResolution, LFileSettings::SetWMFResolution

Topics:

Raster Image Functions: Input and Output

 

Loading and Saving Images

For a list of functions that use either the LOADFILEOPTION structure or the SAVEFILEOPTION structure, refer to Functions Utilizing the LOADFILEOPTION or SAVEFILEOPTION Structures.

Example

For an example, refer to LFile::ReadComment.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.