ColorThreshold example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
var
nI: L_INT;
CompData: TLEADCompDataArr;
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );
for nI:=0 to 2 do
begin
CompData[nI].nMinRange:= 128;
CompData[nI].nMaxRange:= 255;
CompData[nI].uFlags:= 0;
end;
{ Apply color Threshold effect on the image }
LEADImage1.ColorThreshold( CLTH_RGB_SPACE, CompData );
end;