ImageSaveOptions.Resolution
Contents
[
Hide
]ImageSaveOptions.Resolution property
Gets or sets the resolution for the generated images, in dots per inch.
public float Resolution { get; set; }
Remarks
The default value is 96.
Examples
Shows how to set a image resolution when saving document as image.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document doc = new Document(dataDir + "Aspose.one");
dataDir = dataDir + "SetOutputImageResolution_out.jpg";
// Save the document.
doc.Save(dataDir, new ImageSaveOptions(SaveFormat.Jpeg) { Resolution = 220 });
Shows how to save notebook as image with specified options.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch �ffnen.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
dataDir = dataDir + "ConvertToImageWithOptions_out.png";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
Shows how to save flattened notebook as image.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
notebookSaveOptions.Flatten = true;
dataDir = dataDir + "ConvertToImageAsFlattenedNotebook_out.png";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
See Also
- class ImageSaveOptions
- namespace Aspose.Note.Saving
- assembly Aspose.Note