Convert Microsoft Visio Document to BMP in C#
Tags: csharp, visio, bmp, diagram
Published: 2018-11-09 10:39:19

---
title: Convert Microsoft Visio Document to BMP in C#
published: true
description: Convert Microsoft Visio Document to BMP in C#
tags: #CSharp #Visio #BMP #Diagram
---

Developers can convert any Microsoft Visio document to BMP (_Bitmap Image File_) in C# (_or in any other .NET Framework supported language e.g. VB.NET etc._) using [Aspose.Diagram](https://products.aspose.com/diagram) which is a light-weight, extensible, easy to use API and helps developers to create, manipulate and convert Microsoft Visio files to various formats on client side and server-side without any need to install Microsoft Visio or using any sort of Microsoft Office automation.


**Supported Platforms**

>Aspose.Diagram supports both .NET and Java platforms. Please see [Aspose.Diagram for .NET](https://products.aspose.com/diagram/net) and [Aspose.Diagram for Java](https://products.aspose.com/diagram/java) for your reference.

# Sample Microsoft Visio Document - VSD

For demonstration, we will convert the following [sample Microsoft Visio document](https://github.com/AsposeDiagram/AsposeDiagram-Screenshots-and-Sample-Files/blob/master/Convert-Microsoft-Visio-Document-to-BMP/SampleConvertMicrosoftVisioDocumentToBMP.vsd) to BMP in C# using Aspose.Diagram for .NET. However, you can use any Microsoft Visio document of your choice inside the sample code and it will also be converted to BMP fine.

![Sample Microsoft Visio Document to be converted to BMP using Aspose.Diagram API.](https://raw.githubusercontent.com/AsposeDiagram/AsposeDiagram-Screenshots-and-Sample-Files/master/Convert-Microsoft-Visio-Document-to-BMP/Microsoft-Visio-Document-to-be-convert-BMP-Aspose.Diagram.png "Sample Microsoft Visio Document to be converted to BMP using Aspose.Diagram API.")

# Licensing

Please note, if you will execute the code without prior setting the Aspose.Diagram license, you will get _Evaluation Watermark_ in your output documents. For more information, please go through [Licensing](https://docs.aspose.com/display/diagramnet/Licensing).

# Sample Code

The following sample code converts the Microsoft Visio document to BMP by performing these steps.

* Load Microsoft Visio document to _Aspose.Diagram.Diagram_ object.
* Specify _ImageSaveOptions_ to set resolution for clear image.
* Save the _Aspose.Diagram.Diagram_ object into BMP format with specified _ImageSaveOptions_.

{% gist https://gist.github.com/AsposeDiagram/12e2b5b1191a33a71954faa277f3857a %}

# Output BMP of Microsoft Visio Document by Aspose.Diagram

The following snapshot shows the [Output BMP of Microsoft Visio Document generated by Aspose.Diagram](https://github.com/AsposeDiagram/AsposeDiagram-Screenshots-and-Sample-Files/blob/master/Convert-Microsoft-Visio-Document-to-BMP/OutputConvertMicrosoftVisioDocumentToBMP.bmp) with the code given above. As you can see, the BMP looks exactly same as Microsoft Visio document.


![Output BMP generated by Aspose.Diagram from Microsoft Visio document.](https://raw.githubusercontent.com/AsposeDiagram/AsposeDiagram-Screenshots-and-Sample-Files/master/Convert-Microsoft-Visio-Document-to-BMP/Snapshot-OutputConvertMicrosoftVisioDocumentToBMP.png "Output BMP generated by Aspose.Diagram from Microsoft Visio document.")