LBuffer::Resize

#include "ltwrappr.h"

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

L_INT nRow;

/* current row */

L_INT nBitsPerPixel;

/* bits per pixel */

L_INT L_FAR * pXSize;

/* address of a variable to be updated with the width */

L_INT L_FAR * pYSize;

/* address of a variable to be updated with the number of copy repetitions */

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

Parameter

Description

nRow

Current row of the original bitmap.

nBitsPerPixel

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

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.

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:

 

image\sqrblit.gif A value of 0 means that the line should not be copied.

 

image\sqrblit.gif A value of 1 means that the line should be copied once.

 

image\sqrblit.gif A value of 2 means that the line should be copied twice.

 

image\sqrblit.gif And so on ....

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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

LTDIS

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

See Also

Functions:

Class Members

Topics:

Raster Image Functions: Doing Geometric Transformations

 

Resizing Considerations

Example

For an example, refer to LBuffer::StartResize.