AdjustBrightness

TiffImage.AdjustBrightness method

调整一个brightness对于图像.

public override void AdjustBrightness(int brightness)
范围类型描述
brightnessInt32亮度值。

例子

以下示例执行 TIFF 图像的亮度校正。

[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;

    // 设置亮度值。可接受的亮度值在 [-255, 255] 范围内。
    tiffImage.AdjustBrightness(50);
    tiffImage.Save(dir + "sample.AdjustBrightness.png", new Aspose.Imaging.ImageOptions.PngOptions());
}

也可以看看