ColorThreshold example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT nI;
COMPAREDATA CompData[3];
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );
for (nI = 0; nI < 3; nI++)
{
CompData[nI].nMinRange= 128;
CompData[nI].nMaxRange= 255;
CompData[nI].uFlags= 0;
}
/* Apply color Threshold effect on the image*/
LEADImage1->ColorThreshold( CLTH_RGB_SPACE, CompData );
}