LBitmapBase::SetDitheringMethod

#include "ltwrappr.h"

L_VOID LBitmapBase::SetDitheringMethod(uDitheringMethod)

L_UINT uDitheringMethod;

/* the dithering method to be used for the bitmap object */

Sets the dithering method for the class object's bitmap.

Parameter

Description

uDitheringMethod

The dithering method to be used for the bitmap object. Possible values are:

 

Value

Meaning

 

NO_DITHERING

[0] Use no dithering.

 

FLOYD_STEIN_DITHERING

[1] Use the Floyd-Steinberg method.

 

BURKES_DITHERING

[3] Use the Burkes method.

 

STUCKI_DITHERING

[2] Use the Stucki method.

 

SIERRA_DITHERING

[4] Use the Sierra method.

 

STEVENSON_ARCE_DITHERING

[5] Use the Stevenson-Arce method.

 

JARVIS_DITHERING

[6] Use the Jarvis method.

 

ORDERED_DITHERING

[7] Use ordered dithering, which is faster than other methods but is lower in quality.

 

CLUSTERED_DITHERING

[8] Use clustered dithering.

Returns

None

Comments

Call this function set the dithering method for the class object's bitmap. This value can be different from the class object's default dithering method specified with LBitmapBase::SetDefaultDithering.

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::SetDitheringMethod, LBitmapSettings::DefaultDithering, Class Members

Topics:

Raster Image Functions: Doing Color Expansion or Reduction

 

Raster Image Functions: Doing Color Space Conversions

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LBitmapBase__SetDitheringMethodExample()
{
   L_INT nRet;
   LBitmapBase MyBitmap;
   MyBitmap.SetFileName(MAKE_IMAGE_PATH(TEXT("image1.cmp"))); 
   nRet =MyBitmap.Load();
   if(nRet !=SUCCESS)
      return nRet;
   MyBitmap.SetDitheringMethod(CLUSTERED_DITHERING);
 
   return SUCCESS;
}