AdjustContrast
RasterCachedImage.AdjustContrast method
图像对比
public override void AdjustContrast(float contrast)
范围 | 类型 | 描述 |
---|---|---|
contrast | Single | 对比度值(范围 [-100; 100]) |
例子
以下示例执行光栅缓存图像的对比度校正。
[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;
// 设置对比度值。可接受的对比度值在 [-100f, 100f] 范围内。
rasterImage.AdjustContrast(50);
rasterImage.Save(dir + "sample.AdjustContrast.png");
}
也可以看看
- class RasterCachedImage
- 命名空间 Aspose.Imaging
- 部件 Aspose.Imaging