LMarker::EnumMarkersCallBack

#include "ltwrappr.h"

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

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

Parameters

L_UINT 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.

L_UINT uMarkerSize

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

L_VOID * 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.

LEADMARKERCALLBACK 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.

L_VOID * pLEADUserData

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

Returns

Value Meaning
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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LMarker::Create.

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

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