LEADTOOLS Raster Imaging C DLL Help > Function References > L_DitherLine |
#include "l_bitmap.h"
L_LTKRN_API L_INT L_DitherLine(pBitmap, pBufferSrc, pBufferDst)
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle */ |
L_UCHAR* pBufferSrc; |
/* pointer to the input buffer */ |
L_UCHAR* pBufferDst; |
/* pointer to the output buffer */ |
Used in a loop, dithers the line in a specified input buffer, and writes it to the output buffer. You must supply the function to process data in the input buffer.
Parameter |
Description |
pBitmap |
Pointer to the bitmap handle that has all the information about the input image. It is the same bitmap handle that is passed by the L_StartDithering function. The bitmap does not have to exist, but the information must be complete. The DitheringMethod field in the bitmap handle specifies the dithering method to be used for color reduction. |
pBufferSrc |
Pointer to the input buffer. |
pBufferDst |
Pointer to the output buffer. You must allocate space to hold the output data. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
This function uses the dithering method specified in the bitmap handle. Therefore, it provides better 4- or 8-bit output than the L_ConvertBuffer function.
This function uses the palette that the L_StartDithering function specifies. The output of the L_DitherLine function is made up of 1-, 4-, or 8-bit indexes to the specified palette. L_StopDithering cleans up the allocated variables and buffers. For a description of how the functions relate to each other, refer to the L_StartDithering function description.
Required DLLs and Libraries
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, Linux.
See Also
Functions: |
|
Topics: |
|
|
Example
For an example,refer to L_StartDithering.