#include "l_bitmap.h"

L_VOID pEXT_CALLBACK YourFunction(pOutScan, pInScan, pBitmap, nLeft, nRight, pDibInfo, pUserData)

L_UCHAR *pOutScan;

pointer to the output buffer

L_UCHAR *pInScan;

pointer to the input buffer


Pointer to the bitmap handle

L_INT nLeft;

the left pixel offset into the input buffer

L_INT nRight;

the right pixel offset into the input buffer


pointer to PAINTDIBINFO structure containing information on the expected output image data

L_VOID *pUserData;

pointer to additional data

This callback is used to convert input image data to output data suitable for display.




Pointer to the output buffer. The function should fill this buffer with data compatible with the display, according to information in pDibInfo.


Pointer to the input buffer containing data of the same type as pBitmap.


Pointer to the bitmap handle structure indicating the format of the input buffer.


Index of the first pixel in pInScan that should be copied to pOutBuf.


Index of the first pixel after nLeft that should not be copied to pOutBuf.


Void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the PAINTCALLBACKDATA structure.)


This function does not return any value.


You should use this callback if the built-in LEADTOOLS functions for converting image data are not suitable. However, the built-in functions are fast should be capable of performing most conversion needed. So it is recommended you use this callback only as a last resort.

The callback is expected to convert one row of image data. pInScan contains the input data and pOutScan contains the output data.

The callback is expected to skip the first nLeft pixels in the input buffer and convert the next (nRight - nLeft) pixels. So, nLeft is the index of the first pixel and not the byte offset into the input buffer. nRight is the index of the first pixel that should not be converted. Only pixels nLeft, nLeft+1,  ... , nRight - 1 are expected to be copied to pOutScan.

pDibInfo is the PAINTDIBINFO structure initialized by the PAINTCALLBACK_GETDIBINFO callback. This callback will not be called unless you provide a valid PAINTCALLBACK_GETDIBINFO callback.

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


For an example, refer to L_PaintDCCallback.

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

LEADTOOLS Raster Imaging C API Help