LBitmapBase::DitherLine

#include "ltwrappr.h"

virtual L_INT LBitmapBase::DitherLine(pLBufferSrc, pLBufferDst)

LBuffer L_FAR * pLBufferSrc;

/* pointer to an LBuffer object that contains the data to dither */

LBuffer L_FAR * pLBufferDst;

/* pointer to an LBuffer object that will receive the dithered data */

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

pLBufferSrc

Pointer to an LBuffer object that contains the data to dither.

pLBufferDst

Pointer to an LBuffer object that will receive the dithered data.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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.

This function uses the dithering method specified in the class object's bitmap handle. Therefore, it provides better 4- or 8-bit output than the LBuffer::ConvertBuffer function.

This function uses the palette that the LBitmapBase::StartDithering function specifies. The output of the LBitmapBase::DitherLine function is made up of 1-, 4-, or 8-bit indexes to the specified palette. LBitmapBase::StopDithering cleans up the allocated variables and buffers. For a description of how the functions relate to each other, refer to the LBitmapBase::StartDithering function description.

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.

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.

See Also

Elements:

LBitmapBase::StartDithering, LBitmapBase::StopDithering, Class Members

Topics:

Raster Image Functions: Doing Color Expansion or Reduction

 

Raster Image Functions: Doing Color Space Conversions

Example

For an example, refer to LBitmapBase::StartDithering.