LMarker::EnumMarkersCallBack

#include "ltwrappr.h"

virtual L_INT LMarker::EnumMarkersCallBack (uMarker, uMarkerSize, pMarkerData, pfnLEADCallback, pLEADUserData)

L_UINT uMarker;

/* marker type */

L_UINT uMarkerSize;

/* marker size */

L_VOID L_FAR * pMarkerData;

/* marker data */

LEADMARKERCALLBACK pfnLEADCallback;

/* LEADMARKERCALLBACK callback function */

L_VOID L_FAR * pLEADUserData;

/* pointer to additional parameters */

Handles each marker provided by the calling function LMarker::Enum.

Parameter

Description

uMarker

Value that represents the type of marker passed to the callback function. Possible values are range between 0xE0 and 0xFE. Other values are possible. To determine what marker types are allowed, refer to the JPEG specification.

uMarkerSize

Size of the type of marker indicated in uMarker, in bytes. Must be between 0 and 0xFFFD.

pMarkerData

A void pointer that you can use to access a variable or structure containing data associated with the marker in uMarker, that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. This parameter is needed only if uMarkerSize > 0. The marker data should be at least uMarkerSize bytes.

 

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

pfnLEADCallback

Callback function for writing each enumerated marker. Call this function if you want to insert an extra marker at the current position.

 

LMarker::EnumMarkersCallBack calls this callback function as it gets the handle of each marker. The callback function is provided by LEADTOOLS and will adhere to the function prototype described in the LEADMARKERCALLBACK Function.

pLEADUserData

Void pointer that you should pass to pfnLEADCallback if you call it directly.

Returns

SUCCESS

Copy the current marker to the resulting marker collection. This resulting marker collection will be referenced by the marker object when the LMarker::Enum function successfully returns. Continue enumerating the remaining markers.

SUCCESS_IGNOREMARKER

Ignore the current marker. The current marker will be removed from the resulting marker collection. Continue enumerating the remaining markers.

SUCCESS_IGNOREALLMARKERS

Ignore the current marker and all remaining markers. Abort the enumeration without writing any other markers.

SUCCESS_IGNORETHISCOPYALL

Ignore the current marker but copy all the remaining markers to the resulting marker collection. Abort the enumeration but copy all remaining markers

SUCCESS_ABORT

Copy this and all remaining markers. Abort the enumeration.

Comments

This function will be called for every marker present in the handle. Return SUCCESS to leave the current marker in the marker collection. Return SUCCESS_IGNOREMARKER to delete the current marker from the collection.

Call pfnLEADCallback to insert a new marker in the collection before the current marker.

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::Free, LMarker::GetCount, LMarker::GetHandle, LMarker::GetGlobalMarkers, LMarker::Insert, LMarker::Load, LMarker::SetAsGlobalMarkers, LMarker::SetHandle, LFile::WriteMetaData, Class Members

Topics:

Raster Image Functions: Markers

 

Working with Markers

Example

For an example, refer to LMarker::Create.