ImageGear v26.3 - Updated
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearRasterProcessing Class / AdjustContrast Method / AdjustContrast(ImGearRasterPage,Double,Double,Double) Method
Image to adjust contrast.
Contrast value.
Brightness value.
Gamma value.




In This Topic
    AdjustContrast(ImGearRasterPage,Double,Double,Double) Method
    In This Topic
    Adjusts contrast, brightness, and gamma.
    Syntax
    'Declaration
     
    Public Overloads Shared Sub AdjustContrast( _
       ByVal page As ImGearRasterPage, _
       ByVal contrast As Double, _
       ByVal brightness As Double, _
       ByVal gamma As Double _
    ) 
    'Usage
     
    Dim page As ImGearRasterPage
    Dim contrast As Double
    Dim brightness As Double
    Dim gamma As Double
     
    ImGearRasterProcessing.AdjustContrast(page, contrast, brightness, gamma)
    public static void AdjustContrast( 
       ImGearRasterPage page,
       double contrast,
       double brightness,
       double gamma
    )
    public: static void AdjustContrast( 
       ImGearRasterPage* page,
       double contrast,
       double brightness,
       double gamma
    ) 
    public:
    static void AdjustContrast( 
       ImGearRasterPage^ page,
       double contrast,
       double brightness,
       double gamma
    ) 

    Parameters

    page
    Image to adjust contrast.
    contrast
    Contrast value.
    brightness
    Brightness value.
    gamma
    Gamma value.
    Remarks
    If the image is indexed and not grayscale, it modifies the image's palette, otherwise it modifies the image's pixels. Processes only color channels. Contrast mode is ImGearContrastModes.AUTO.

    Average parameter range:

    • Contrast: -2 ... +2 (negative means contrast inversion. In case of 1 no changes)
    • Brightness: -128...+128
    • Gamma: 0...10

    Can be applied only to the raster pages with standard (non Run-Ends) DIB.

    Method ImGearRasterProcessing.Verifier.CanApplyAdjustContrast (ImGearPage page) can be called to check whether the operation can be performed.

    Example
    See Also