Last active
August 13, 2022 05:00
-
-
Save aspose-com-kb/32257abf78807e436c352c30dc183d9b to your computer and use it in GitHub Desktop.
Code to Convert Visio to JPG in C#. For more details: https://kb.aspose.com/diagram/net/how-to-convert-visio-to-jpg-in-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
namespace AsposeProjects | |
{ | |
class Program | |
{ | |
static void Main(string[] args) // Main function to convert VSDX to JPG | |
{ | |
// Load the license | |
Aspose.Diagram.License lic = new Aspose.Diagram.License(); | |
lic.SetLicense(@"Aspose.Total.lic"); | |
// Load input VSD VSDX Visio file | |
Aspose.Diagram.Diagram diagram = new Aspose.Diagram.Diagram("VisioToJPG.vsdx"); | |
// Specify output image format as JPG | |
Aspose.Diagram.Saving.ImageSaveOptions options = new Aspose.Diagram.Saving.ImageSaveOptions(Aspose.Diagram.SaveFileFormat.Jpeg); | |
// Set quality for the output image | |
options.JpegQuality = 50; | |
// Save the resultant Image file | |
diagram.Save("VisioToJPG.jpg", options); | |
System.Console.WriteLine("Done"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment