Enum ColorMode
Enum ColorMode
نام ها : Aspose.Note.Saving جمع آوری: WL31_.dll (25.4.0)
حالت رنگی تصویر
public enum ColorMode
Fields
BlackAndWhite = 2
تصویر دوگانه: فقط رنگ های سیاه و سفید استفاده می شود
GrayScale = 1
تصویر مقیاس خاکستری
Normal = 0
تصویر رنگی کامل
Examples
نشان می دهد که چگونه یک سند را به عنوان تصویر خاکستری ذخیره کنید.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir = dataDir + "SaveAsGrayscaleImage_out.png";
// Save the document as gif.
oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
{
ColorMode = ColorMode.GrayScale
});
نشان می دهد که چگونه یک سند را به عنوان تصویر در فرمت Tiff با استفاده از فکس فشرده سازی CCITT Group 3 ذخیره کنید.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));
var dst = Path.Combine(dataDir, "SaveToTiffUsingCcitt3Compression.tiff");
// Save the document.
oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
{
ColorMode = ColorMode.BlackAndWhite,
TiffCompression = TiffCompression.Ccitt3
});
نشان می دهد که چگونه یک سند را به عنوان یک تصویر باینری با استفاده از روش Otsu ذخیره کنید.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir = dataDir + "SaveToBinaryImageUsingOtsuMethod_out.png";
// Save the document as gif.
oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
{
ColorMode = ColorMode.BlackAndWhite,
BinarizationOptions = new ImageBinarizationOptions()
{
BinarizationMethod = BinarizationMethod.Otsu,
}
});
نشان می دهد که چگونه یک سند را به عنوان یک تصویر باینری با استفاده از حد ثابت ذخیره کنید.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir = dataDir + "SaveToBinaryImageUsingFixedThreshold_out.png";
// Save the document as gif.
oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
{
ColorMode = ColorMode.BlackAndWhite,
BinarizationOptions = new ImageBinarizationOptions()
{
BinarizationMethod = BinarizationMethod.FixedThreshold,
BinarizationThreshold = 123
}
});