Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LBitmapBase::PutRowCol

Show in webframe

#include "ltwrappr.h"

virtual L_SSIZE_T LBitmapBase::PutRowCol (LBuff, nRow, nCol)

LBuffer& LBuff;

/* an LBuffer object that contains the image data */

L_INT nRow;

/* number of the row to update */

L_INT nCol;

/* column offset within the row to update */

Copies data from a buffer into a class objects bitmap, with an offset to the bitmap. The data is copied exactly as it is stored in the buffer. The buffer contains uncompressed data.

Parameter

Description

LBuff

An LBuffer object that contains 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.

nCol

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

Returns

>=1

The number of bytes put.

< 1

An error occurred. Refer to Return Codes.

Comments

Copies data from a buffer to the class object's bitmap, with an offset to the bitmap. The buffer to which contains uncompressed data.

By using this low-level function to update any part of a row, you can write a procedure that updates a single pixel or a rectangular area within the bitmap.

You must consider the bits per pixel of the bitmap when specifying the parameters. The following table describes the rules:

Bits Per Pixel

Column Offset (in Pixels)

Bytes to Update

1

Must be a multiple of 8 (such as 0, 8, or 16).

Should not go past the end of the row. Consider that there are 8 pixels per byte.

4

Must be an even number (such as 0, 2, or 4).

Should not go past the end of the row. Consider that there are 2 pixels per byte.

8

Can be any column within the bitmap.

Should not go past the end of the row. Consider that there is 1 pixel per byte.

16

Can be any column within the bitmap.

Must be a multiple of 2 (such as 2, 4, or 6), because there are 2 bytes per pixel. Also, it should not go past the end of the row.

24

Can be any column within the bitmap.

Must be a multiple of 3 (such as 3, 6, or 9), because there are 3 bytes per pixel. Also, it should not go past the end of the row.

32

Can be any column within the bitmap.

Must be a multiple of 4 (such as 4, 8, or 12), because there are 4 bytes per pixel. Also, it should not go past the end of the row.To speed up the operation then lock the bitmap memory when you use this function alot. Normally, you can call LBitmapBase::Access to lock the memory before starting an operation that uses this function, then call LBitmapBase::Release when the operation is finished.

 

Color order of the target bitmap is determined by the Order field in the bitmap handle. This value can be ORDER_RGB, ORDER_BGR, ORDER_GRAY or ORDER_ROMM

Required DLLs and Libraries

LTDIS
LTFIL

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

Win32, x64.

See Also

Functions:

LBitmapBase::PutRow, LBitmapBase::PutRowCompressed, LBitmapBase::GetRow, LBitmapBase::PutRowColCompressed, LBitmapBase::GetRowColCompressed, Class Members

Topics:

Raster Image Functions: Getting and Setting Pixel Values

Example

For an example, refer to LBitmapBase::GetRowCol.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.