Convert Microsoft Project MPP file to PNG
Contents
[
Hide
Show
]PNG or Portable Network Graphics is a raster-graphics file format that supports lossless data compression. Aspose.Tasks for .NET API lets you save project data to PNG file format.
Exporting Project Data to PNG
To save a project to PNG programmatically using Aspose.Tasks for .NET:
- Load a Microsoft Project MPP file.
- Optionally make changes to the loaded project.
- Save the project to PNG using one of Project.Save method overloads. Your can pass either SaveFileFormat.PNG to save project with default settings or pass ImageSaveOptions to customize export options.
The following article describes properties common for all graphical formats.
The code example given below demonstrates how to export your project data to PNG.
1Project project = new Project("New Project.mpp");
2
3// in order to manipulate JPEG quality one can use ImageSaveOptions.JpegQuality property.
4// The allowed value range is 0..100.
5ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.JPEG) { JpegQuality = 50 };
6
7project.Save("image_out.jpeg", (SaveOptions)options);