L_PutBitmapRow

#include "l_bitmap.h"

L_INT32 EXT_FUNCTION L_PutBitmapRow(pBitmap, pBuffer, nRow, uBytes)

pBITMAPHANDLE pBitmap;

/* pointer to the bitmap handle */

L_UCHAR L_FAR * pBuffer;

/* pointer to the source buffer */

L_INT nRow;

/* number of the row to update */

L_UINT32 uBytes;

/* number of bytes to be updated */

Copies a row of image data from a buffer to a bitmap. The data is copied exactly as it is stored in the buffer. The buffer to which pBuffer points contains uncompressed data.

Parameter

Description

pBitmap

Pointer to the bitmap handle referencing the bitmap to copy the row into.

pBuffer

Pointer to the buffer containing the image data.

nRow

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

uBytes

Number of bytes to be updated. Use the BytesPerLine field in the bitmap handle to determine the byte count of each line.

Returns

>=1

The number of bytes put.

< 1

An error occurred. Refer to Return Codes.

Comments

The bitmap memory must be locked when you use this function. Normally, you can call L_AccessBitmap to lock the memory before starting an operation that uses this function, then call L_ReleaseBitmap when the operation is finished.

You can use the bits per pixel of the image to determine the number of bytes to set the uBytes parameter. If the image is 8-bit then each byte is an index to the palette. If the image is a 24-bit image, then each three bytes represents one pixel element. Color order is determined by the Order field in the bitmap handle. This value can be ORDER_RGB, ORDER_BGR or ORDER_ROMM.

Required DLLs and Libraries

LTKRN

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

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_AccessBitmap, L_ReleaseBitmap, L_ClearBitmap, L_GetBitmapRow, L_GetBitmapRowCol, L_PutBitmapRowCol, L_GetPixelColor, L_PutPixelColor

Topics:

Raster Image Functions: Getting and Setting Pixel Values

Example

For a short example, refer to L_GetBitmapRow. For complete sample code, refer to the RESIZE example.