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

Namespace: Aspose.Imaging.FileFormats.Tiff
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 TIFF image.
[C#]

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

using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
{
    Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

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