ImageEn, unit imageenproc

TImageEnProc.Threshold

TImageEnProc.Threshold


Declaration

procedure Threshold(DownLimit, UpLimit, DownVal, UpVal: TRGB);


Description

Assigns the DownVal color to all colors smaller or equal to DownLimit, and UpVal to all colors greater than UpLimit.


Example

// Change all values less than R/G/B of 64 to black
ImageEnView1.Proc.Threshold(CreateRGB(64, 64, 64), CreateRGB(255, 255, 255), CreateRGB(0, 0, 0), CreateRGB(255, 255, 255));

// Change all values greater than R/G/B of 192 to white
ImageEnView1.Proc.Threshold(CreateRGB(0, 0, 0), CreateRGB(192, 192, 192), CreateRGB(0, 0, 0), CreateRGB(255, 255, 255));

// Change values with a red value greater than 192 to pure red
ImageEnView1.Proc.Threshold(CreateRGB(0, 0, 0), CreateRGB(192, 0, 0), CreateRGB(0, 0, 0), CreateRGB(255, 0, 0));


See Also

- CreateRGB
- TRGB2TColor
- TColor2TRGB