DjvuImageBinarizeFixed Method |
Namespace: Aspose.Imaging.FileFormats.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; // Binarize the image with a threshold value of 127. // If a corresponding gray value of a pixel is greater than 127, a value of 255 will be assigned to it, 0 otherwise. djvuImage.BinarizeFixed(127); djvuImage.Save(dir + "sample.BinarizeFixed.png", new Aspose.Imaging.ImageOptions.PngOptions()); }