GifImageAdjustGamma Method (Single)
Gamma-correction of an image.

Namespace: Aspose.Imaging.FileFormats.Gif
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 21.04
Syntax
public override void AdjustGamma(
	float gamma
)

Parameters

gamma
Type: SystemSingle
Gamma for red, green and blue channels coefficient
Examples
The following example performs gamma-correction of a GIF image.
[C#]

string dir = "c:\\temp\\";

using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
{
    Aspose.Imaging.FileFormats.Gif.GifImage gifImage = (Aspose.Imaging.FileFormats.Gif.GifImage)image;

    // Set gamma coefficient for red, green and blue channels.
    gifImage.AdjustGamma(2.5f);
    gifImage.Save(dir + "sample.AdjustGamma.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
See Also