Resizes image data in the class object's buffer to the new size specified with the LBuffer::StartResize function.


#include "ltwrappr.h"

virtual L_INT LBuffer::Resize(nRow, nBitsPerPixel, pXSize, pYSize)


L_INT nRow

Current row of the original bitmap.

L_INT nBitsPerPixel

Bits per pixel, which is the same for the original and the resized bitmap.

L_INT * pXSize

Address of an integer variable to be updated with the width of the resized line. This function updates the variable with number of pixels the new resized line.

L_INT * pYSize

Address of an integer variable to be updated with the required number of copy repetitions. This function updates the variable with the number of times needed to copy the new resized line buffer to the new image.

When an image is being enlarged, some lines must be copied more than once. When an image is being reduced, some lines must be eliminated (not copied at all). For example:


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


Before calling this function, you must do the following:

  1. Call the LBuffer::StartResize function.
  2. Declare two integer variables (pXSize and pYSize), which this function will update with information about the compressed line of data.

When all lines have been processed, you must call LBuffer::StopResize.

Required DLLs and Libraries


Win32, x64.

See Also




For an example, refer to LBuffer::StartResize.

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

LEADTOOLS Raster Imaging C++ Class Library Help