L_GetBitmapRowColCompressed
#include "l_bitmap.h"
L_LTKRN_API L_SSIZE_T L_GetBitmapRowColCompressed(pBitmap, pWorkBuffer, pRunBuffer, nRow, nCol, uWidth)
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle */ |
L_UCHAR * pWorkBuffer; |
/* pointer to a work buffer */ |
L_UINT16 * pRunBuffer; |
/* pointer to the target buffer */ |
L_INT nRow; |
/* number of the row to retrieve */ |
L_INT nCol; |
/* column offset within the row to retrieve */ |
L_SIZE_T uWidth; |
/* number of pixels to retrieve */ |
Retrieves a row (or part of a row) of 1-bit compressed data from a bitmap that has been loaded in its compressed format.
Parameter |
Description |
pBitmap |
Pointer to the bitmap handle referencing the bitmap to get the image data from. |
pWorkBuffer |
NULL or a pointer to an optional work buffer. Allocating the work buffer speeds processing if you call this function more than once, because if you do not allocate a work buffer, the function allocates and frees a temporary buffer each time it is called. The size of this buffer should be the same as the bitmap handle's BytesPerLine field. |
pRunBuffer |
Pointer to the output buffer, which will be filled with 1-bit compressed image data. Calculate the required size of this buffer as follows: bytes required = (nWidth + 3) * 2. |
nRow |
The number of the row to retrieve. The first row is 0, and the last row is 1 less than the bitmap height. |
nCol |
The column offset within the row to retrieve. The first column offset is 0, and the last column offset is 1 less than the bitmap width. |
uWidth |
The number of pixels to retrieve. |
Returns
> 0 |
The number of pixels processed. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function is useful for working with 1-bit images that are loaded in their compressed formats for faster loading and display. For more information, refer to Speeding Up 1-Bit Documents.
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
Win32, x64, Mobile.
See Also
Functions: |
L_ExpandRow, L_CompressRow, L_PutBitmapRowColCompressed, L_GetBitmapRowCompressed, L_PutBitmapRowCompressed |
Topics: |
Example
For an example,refer to L_PutBitmapRowColCompressed.