L_DitherLine

Summary

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.

Syntax

#include "l_bitmap.h"

L_LTKRN_API L_INT L_DitherLine(pBitmap, pBufferSrc, pBufferDst)

Parameters

pBITMAPHANDLE 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.

L_UCHAR* pBufferSrc

Pointer to the input buffer.

L_UCHAR* pBufferDst

Pointer to the output buffer. You must allocate space to hold the output data.

Returns

Value Meaning
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

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

For an example, refer to L_StartDithering.

Help Version 22.0.2023.7.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.