#include "l_bitmap.h"

L_INT pEXT_CALLBACK YourFunction(pBitmap, pBuffer, nRow, nCol, uBytes, pUserData)


bitmap handle

L_UCHAR* pBuffer;

buffer for data

L_INT nRow;

number of the row to provide

L_INT nCol;

column offset within the row to provide

L_SIZE_T uBytes;

number of bytes to retrieve

L_VOID* pUserData;

pointer to additional parameters

Callback function used to feed to the resizing engine image data to be resized.




Pointer to a bitmap handle.


Buffer that contains image data.


The number of the row to provide. The first row is 0, and the last row is 1 less than the bitmap height.


The column offset within the row to provide. The first column offset is 0, and the last column offset is 1 less than the bitmap width.


The number of bytes to retrieve.


A 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 calling function.)


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



The number of bytes that the function wrote to the file.


The function failed.


This is an optional callback function used by the L_StartResizeBitmap function. It is called by L_StartResizeBitmap to get the data from the bitmap. One possible use of this is to resize bitmaps that are too large to fit into memory. You can use the callback to feed to the resizing engine one line at a time.

This serves as a replacement for the L_GetBitmapRowCol function, which may be unable to retrieve certain images, such as extremely large images. This callback allows you to retrieve portions of an image for resizing.

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


L_INT ResizeCallback ( 
   pBITMAPHANDLE pBitmap,  
   L_UCHAR  *pBuffer,  
   L_INT nRow,  
   L_INT nCol, 
   L_SSIZE_T uBytes,  
   L_VOID  *pUserData) 
   L_SSIZE_T uBytesRead = L_GetBitmapRowCol(pBitmap, pBuffer, nRow, nCol, uBytes); 
   return uBytesRead == uBytes ? SUCCESS : FAILURE;  
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