PAINTCALLBACK_CONVERTLINE Function

#include "l_bitmap.h"

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

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

Parameters

L_UCHAR *pOutScan

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

L_UCHAR *pInScan

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

pBITMAPHANDLE pBitmap

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

L_INT nLeft

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

L_INT nRight

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

pPAINTDIBINFO pDibInfo

Pointer to PAINTDIBINFO structure containing information on the expected output image data.

L_VOID *pUserData

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

Returns

This function does not return any value.

Comments

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

Example

For an example, refer to L_PaintDCCallback.

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

LEADTOOLS Raster Imaging C API Help