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

Namespace: Aspose.Imaging
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 20.06
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 raster cached image.
[C#]

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

using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.png"))
{
    Aspose.Imaging.RasterCachedImage rasterImage = (Aspose.Imaging.RasterCachedImage)image;

    // Set gamma coefficient for red, green and blue channels.
    rasterImage.AdjustGamma(2.5f);
    rasterImage.Save(dir + "sample.AdjustGamma.png");
}
See Also