ImageEn, unit imageenproc




procedure Contrast3(Change, Midpoint: Integer; DoRed, DoGreen, DoBlue: Boolean);


Applies contrast to the image by lightening or darkening pixels depending on whether they are above or below a threshold. The Midpoint value determines the threshold, i.e. the point at which the Change value influences the pixel value lighter or darker.

Parameter Description
Change The level of contrast to be applied each side of the midpoint (value between -255 and 255). When positive, increasing the Midpoint value increases the contrast (darkens the image). When negative, Increasing the Midpoint value lightens the image
Midpoint The threshold of light and dark (value between -100 and 100)
DoRed, DoGreen, DoBlue If True, changes are applied to that RGB channel


// Apply Contrast of +20 to all RGB values around the default Midpoint value:
ImageEnView.Proc.Contrast3 (0, 20, True, True, True);

// Apply Contrast of -24, to the Red and Blue RGB channels only, around a Midpoint of +10, to lighten the overall result:
ImageEnView.Proc.Intensity (10, -24, True, False, True);

// Apply Contrast of +15, to the Green RGB channel only, around a Midpoint of +30, to darken the overall result:
ImageEnView.Proc.Intensity (30, 15, False, True, False);

See Also

Public Method  Contrast
Public Method  Contrast2