RasterImageAdjustGamma Method (Single, Single, Single) |
Gamma-correction of an image.
Namespace: Aspose.ImagingAssembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 22.05
Syntaxpublic virtual void AdjustGamma(
float gammaRed,
float gammaGreen,
float gammaBlue
)
Public Overridable Sub AdjustGamma (
gammaRed As Single,
gammaGreen As Single,
gammaBlue As Single
)
public:
virtual void AdjustGamma(
float gammaRed,
float gammaGreen,
float gammaBlue
)
abstract AdjustGamma :
gammaRed : float32 *
gammaGreen : float32 *
gammaBlue : float32 -> unit
override AdjustGamma :
gammaRed : float32 *
gammaGreen : float32 *
gammaBlue : float32 -> unit
Parameters
- gammaRed
- Type: SystemSingle
Gamma for red channel coefficient - gammaGreen
- Type: SystemSingle
Gamma for green channel coefficient - gammaBlue
- Type: SystemSingle
Gamma for blue channel coefficient
ExamplesThe following example performs gamma-correction of an image applying different coefficients for color components.
[C#]
string dir = "c:\\temp\\";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.png"))
{
Aspose.Imaging.RasterImage rasterImage = (Aspose.Imaging.RasterImage)image;
rasterImage.AdjustGamma(1.5f, 2.5f, 3.5f);
rasterImage.Save(dir + "sample.AdjustGamma.png");
}
See Also