LFile::WriteMetaData

#include "ltwrappr.h"

virtual L_INT LFile::WriteMetaData(uFlags, pSaveFileOption)

L_UINT uFlags;

/* type of metadata */

pSAVEFILEOPTION pSaveOption;

/* reserved for future use */

Writes metadata of the specified type to the file specified for this file object.

Parameter

Description

uFlags

Flags that indicate the type of metadata to write. Possible values are:

 

Value

Meaning

 

METADATA_COMMENTS

[0x0001] Write comments.

 

METADATA_TAGS

[0x0002] Write tags.

 

METADATA_MARKERS

[0x0004] Write markers.

 

METADATA_ALL

[0xFFFF] Write all metadata (tags, comments and markers).

 

These values can be combined using OR (|) or +.

pSaveFileOption

Reserved for future use. Pass NULL.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

LFile::WriteMetaData can be used to update an existing file with comments, tags and/or markers.

Before calling this function, the user should set:

image\sqrblit.gif Comments using the LFileSettings::SetComment function.

image\sqrblit.gif Tags using the LFileSettings::SetTag function.

image\sqrblit.gif Markers using the LMarker::SetAsGlobalMarkers function.

When you add or remove comments or tags, the comments and tags array at the end of the TIFF/Exif image file is re-written. When you modify existing comments or tags, the new value is added to the file and the IFD is modified as necessary. In all of these cases, there is no image recompression.

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.

See Also

Functions:

LMarker::Copy, LMarker::Create, LMarker::Delete, LMarker::DeleteIndex, LMarker::Enum, LMarker::EnumMarkersCallBack, LMarker::Free, LMarker::GetCount, LMarker::GetHandle, LMarker::GetGlobalMarkers, LMarker::Insert, LMarker::Load, LMarker::SetAsGlobalMarkers, LMarker::SetHandle, LFile::WriteMetaData, LFile::WriteComment, LFile::WriteTag, Class Members

Topics:

Raster Image Functions: Markers

 

Working with Markers

Example

   L_INT    nVal = 1234;
   LFile MyFile;
   LFileSettings MyFileSettings;
   MyFileSettings.SetTag(0x8001, TAG_LONG, 1, &nVal);
   MyFileSettings.SetComment(CMNT_SZDESC, (unsigned char *) TEXT("Comment written with WriteMetaData"), 37);
   MyFile.SetFileName(TEXT("e:\\i\\1.tif"));
   MyFile.WriteMetaData(METADATA_ALL, NULL);