Grayscale

DjvuImage.Grayscale method

将图像转换为其灰度表示

public override void Grayscale()

例子

以下示例将彩色 DJVU 图像转换为其灰度表示。灰度图像仅由灰度阴影组成,仅携带强度信息。

[C#]

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

using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.djvu"))
{
    Aspose.Imaging.FileFormats.Djvu.DjvuImage djvuImage = (Aspose.Imaging.FileFormats.Djvu.DjvuImage)image;

    djvuImage.Grayscale();
    djvuImage.Save(dir + "sample.Grayscale.png", new Aspose.Imaging.ImageOptions.PngOptions());
}

也可以看看