In our recent blog post, we discussed how to convert a CMX file to PNG programmatically. This guide will focus on how to convert CDR to PNG in .NET using Aspose.Imaging for .NET. Data storage management has been so crucial, and dealing with bulky file formats such as CDR has become a challenge. So, exporting such heavyweight files into optimized lightweight file formats, such as PNG, gives you an advantage in terms of storage, sharing, and viewing. Therefore, we will use this CoreDRAW SDK to achieve this conversion in a .NET project. Let’s get started.
SDK For CoreDRAW Files - Installation
Visit this link to download the SDK or install it by running the following command in Package Manager Console.
Install-Package Aspose.Imaging
Convert CDR to PNG in .NET Programmatically
Follow the steps mentioned below:
- Invoke the Image.Load method to load the source CDR file.
- Instantiate an instance of the PngOptions class.
- Set the color type by setting the value of the ColorType property.
- Set the vector rasterization options.
- Invoke the Save method to save the file as the PNG file format.
Copy the following code sample and paste it into your project file. Then, run the server to convert CDR to PNG in .NET programmatically.
Output:
Get a Free License
Get a free temporary license to try this C# SDK beyond evaluation limitations.
Ask a question
Ask your questions on our forum.
Summing up
This brings us to the end of this blog post. We have gone through how to convert CDR to PNG in .NET using Aspose.Imaging for .NET. Moreover, we explained each line of the code snippet for your better understanding. This CoreDRAW SDK is a proper solution to develop a CDR to PNG converter for your applications. However, we will come again. Meanwhile, you can explore the following resources: