Applies contrast to the image by lightening or darkening pixels depending on whether they are above or below a threshold.
The midPoint value determines that threshold, the point at which the Change value influences the pixel value lighter or darker.
When change values are positive, Increasing the Midpoint value darkens the contrast.
When change values are negative, Increasing the Midpoint value lightens the contrast.
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0
Syntax
C# | Visual Basic | Visual C++ |
public void ModifyContrast3( int change, int midPoint, bool doRed, bool doGreen, bool doBlue )
Public Sub ModifyContrast3 ( _ change As Integer, _ midPoint As Integer, _ doRed As Boolean, _ doGreen As Boolean, _ doBlue As Boolean _ )
public: void ModifyContrast3( int change, int midPoint, bool doRed, bool doGreen, bool doBlue )
Parameters
- change
- Int32
An integer between -255 and 255 that indicates the level of contrast to be applied each side of the midpoint.
- midPoint
- Int32
An integer between -100 and +100 that determines the threshold of light and dark.
- doRed
- Boolean
If True, applies the change to this RGB channel.
- doGreen
- Boolean
If True, applies the change to this RGB channel.
- doBlue
- Boolean
If True, applies the change to this RGB channel.
Examples
CopyC#
// Apply Contrast of +20 to all RGB values around the default Midpoint value: ieViewer1.Image.ModifyContrast3(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: ieViewer1.Image.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: ieViewer1.Image.Intensity(30, 15, false, true, false);