#include "l_bitmap.h"

L_LTFIL_API L_INT L_InsertMarker(hMarkers, uIndex, uMarker, uMarkerSize, pMarkerData)

L_VOID* hMarkers;

marker handle

L_UINT uIndex;

position at which to insert the marker

L_UINT uMarker;

markers type

L_UINT uMarkerSize;

markers data size

L_UCHAR* pMarkerData;

markers data

Inserts a marker in a marker collection.




Handle to a collection of metadata markers. This handle is created by either the L_LoadMarkers function or the L_CreateMarkers function.


Position in the list at which to insert the marker. Use 0xFFFFFFFF to append the marker to the end of the list. If there are fewer than uIndex markers in the collection, the marker will be appended to the end of the list.


Use zero-based indexing. For example, if there are 10 markers in a list, the index of the last one is 9. If you insert a marker within a list, the indexes of other markers change to accommodate the insertion.


Value that represents the type of marker to insert. Recommended values are between 0xE0 and 0xFE. Other values are possible, but before using other values, study the JPEG specs to determine which markers are allowed.


The size of the marker data, in bytes. This must be between 0 and 0xFFFD.


Pointer to the marker data. This parameter is needed only if uMarkerSize > 0.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


You can insert a marker anywhere in the marker collection.

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64, Linux.

See Also


L_LoadMarkers, L_CreateMarkers, L_EnumMarkers, L_GetMarkerCount, L_GetMarker, L_MarkersSupported


Raster Image Functions: Markers


Working with Markers


Insert APP2 data at the end of the marker list The example assumes APP2_marker_size is the size of APP2 data APP2_marker_data points to the APP2 data

#define APP2 0xE2 
L_INT InsertMarkerExample(L_HANDLE hMarkers, L_UINT APP2_marker_size,L_VOID *APP2_marker_data) 
   L_INT nRet; 
   nRet = L_InsertMarker(hMarkers, 0xFFFFFFFF, APP2, APP2_marker_size,(L_UCHAR *) APP2_marker_data); 
   return nRet; 

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

LEADTOOLS Raster Imaging C API Help