ImageEn, unit imageenproc |
|
TImageEnProc.Contrast3
Declaration
procedure Contrast3(Change, Midpoint: Integer; DoRed, DoGreen, DoBlue: Boolean);
Description
Apply 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 |
Note: If the image
PixelFormat is not ie24RGB, it will be converted
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Apply Contrast of -24, to the Red and Blue RGB channels only, around a Midpoint of +10, to lighten the overall result:
ImageEnView1.Proc.Intensity( -24, 10, True, False, True );
// Apply Contrast of +15, to the Green RGB channel only, around a Midpoint of +30, to darken the overall result
ImageEnView1.Proc.Intensity( 15, 30, False, True, False );
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Apply Contrast of +20 to all RGB values around the default Midpoint value
ImageEnView1.Proc.Contrast3( 20, 0, True, True, True );
See Also
◼Contrast◼Contrast2