Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# Image.correctGamma Method

Module: Image

## Definition

Applies a gamma correction to the image.

Python

    correct_gamma(self, contrast: int, brightness: int, gamma: float) -> None

Parameters

> `contrast` int
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` int
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` float
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    void correctGamma(int contrast, int brightness, double gamma)

Parameters

> `contrast` int
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` int
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` double
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public void CorrectGamma(int contrast, int brightness, float gamma)

Parameters

> `contrast` int
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` int
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` float
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public void correctGamma(int contrast, int brightness, float gamma) throws FaceException

Parameters

> `contrast` int
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` int
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` float
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func correctGamma(contrast: Int32, brightness: Int32, gamma: Float) throws

Parameters

> `contrast` Int32
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` Int32
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` Float
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FaceImage_CorrectGamma (
        ID3_FACE_IMAGE hImage,
        int contrast,
        int brightness,
        float gamma)

Parameters

> `hImage` ID3_FACE_IMAGE
> in Handle to the Image object.
> `contrast` int
> in Contrast coefficient, from -255 to 255, to be applied to the image.
> `brightness` int
> in Brightness coefficient, from -255 to 255, to be applid to the image.
> `gamma` float
> in Gamma coefficient, from 0.25 to 2.50, to be applied to the image.

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.