Grayscale
TiffImage.Grayscale method
将图像转换为其灰度表示
public override void Grayscale()
例子
以下示例将彩色 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;
tiffImage.Grayscale();
tiffImage.Save(dir + "sample.Grayscale.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
也可以看看
- class TiffImage
- 命名空间 Aspose.Imaging.FileFormats.Tiff
- 部件 Aspose.Imaging