COMPDATA

typedef struct tagCOMPDATA
{
   L_UINT uStructSize;
   L_INT nMinRange;
   L_INT nMaxRange;
   L_UINT uFlags;
}
COMPDATA, L_FAR * LPCOMPDATA;

The COMPDATA structure contains the values to be used for thresholding and redistributing the bitmap's color component values for the L_ColorThresholdBitmap function.

Member

Description

uStructSize

Size of the structure. Should be set to sizeof(COMPDATA).

nMinRange

Value that represents the minimum boundary used to threshold the specific color.

nMaxRange

Value that represents the maximum boundary used to threshold the specific color.

uFlags

Value that represents the value that should be distributed to the thresholded component. Possible values are:

 

The following are the flags that define treatment of the values between the min and max threshold range:

 

Value

Meaning

 

CLTH_TYP_BANDPASS

[0x00000000] The values falling outside the range are modified.

 

CLTH_TYP_BANDREJECT

[0x00000001] The values falling inside the range are modified.

 

 

The following are the flags that define treatment of the thresholded pixel:

 

Value

Meaning

 

CLTH_MOD_CHANNEL

[0x00000000] Each channel component is modified independently.

 

CLTH_MOD_ALL

[0x00000010] The pixel is rejected the test if one of the component is rejected.

 

 

The following are the flags that define the new values for the rejected values:

 

Value

Meaning

 

CLTH_VALUE_MIN

[0x00000000] The rejected values are set to 0.

 

CLTH_VALUE_MAX

[0x00000100] The rejected values are set to the maximum value

 

CLTH_VALUE_CLAMP

[0x00000200] The rejected component values less that nMin go to the minimum value in the used color space component and the rejected component values greater than nMax go to the maximum value in the used color space component. This works only with the CLTH_MOD_CHANNEL flag.