You can find detailed information at: Convert MS Project MPP to Images (PNG, JPEG, BMP, TIFF) using C#
Last active
August 13, 2021 11:11
-
-
Save aspose-com-gists/05bd9878e2618d39e0633beccc2eb507 to your computer and use it in GitHub Desktop.
Convert MS Project MPP to Images (PNG, JPEG, BMP, TIFF) using C# | https://blog.aspose.com/2021/08/12/convert-ms-project-mpp-to-images-png-jpeg-bmp-tiff-using-csharp/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Create an instance of the ImageSaveOptions class | |
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.BMP); | |
// Save the BMP image | |
project.Save("OutputDirectory\\image_out.bmp", (SaveOptions)options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// In order to manipulate JPEG quality, you can use ImageSaveOptions.JpegQuality property. | |
// The allowed value range is from 0 to 100. | |
// Create an instance of the ImageSaveOptions class | |
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.JPEG) { JpegQuality = 50 }; | |
// Save the JPEG image | |
project.Save("OutputDirectory\\image_out.jpeg", (SaveOptions)options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Create an instance of the ImageSaveOptions class | |
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.TIFF); | |
// Save the TIFF image | |
project.Save("OutputDirectory\\RenderMultipageTIFF_out.tif", (SaveOptions)options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Create an instance of the ImageSaveOptions class | |
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG); | |
// Save the PNG image | |
project.Save("OutputDirectory\\image_out.png", (SaveOptions)options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment