ImageSaveOptions.Resolution
محتويات
[
يخفي
]ImageSaveOptions.Resolution property
يحصل أو يضبط الدقة للصور المُولَّدة، بوحدة النقاط في البوصة.
public float Resolution { get; set; }
ملاحظات
القيمة الافتراضية هي 96.
أمثلة
يعرض كيفية ضبط دقة الصورة عند حفظ المستند كصورة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// حمّل المستند إلى Aspose.Note.
Document doc = new Document(dataDir + "Aspose.one");
dataDir = dataDir + "SetOutputImageResolution_out.jpg";
// احفظ المستند.
doc.Save(dataDir, new ImageSaveOptions(SaveFormat.Jpeg) { Resolution = 220 });
يوضح كيفية حفظ الدفتر كصورة مع الخيارات المحددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_NoteBook();
// تحميل دفتر OneNote
var notebook = new Notebook(dataDir + "Notebook.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
dataDir = dataDir + "ConvertToImageWithOptions_out.png";
// احفظ الدفتر
notebook.Save(dataDir, notebookSaveOptions);
يوضح كيفية حفظ الدفتر المسطح كصورة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_NoteBook();
// تحميل دفتر OneNote
var notebook = new Notebook(dataDir + "Notebook.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
notebookSaveOptions.Flatten = true;
dataDir = dataDir + "ConvertToImageAsFlattenedNotebook_out.png";
// احفظ الدفتر
notebook.Save(dataDir, notebookSaveOptions);
انظر أيضًا
- class ImageSaveOptions
- namespace Aspose.Note.Saving
- assembly Aspose.Note