How to Export CDR Image to PSD format in C#

This step by step tutorial will show you how to export CDR image to PSD format in C#. This simple C# code is able to create PSD image from CDR file using few lines of code.

Steps to Export CorelDRAW CDR Image to Photoshop PSD Format in C#

  1. Setup Aspose.Imaging for .NET package from Nuget.org
  2. Include reference to following three namespaces: Aspose.Imaging, Aspose.Imaging.FileFormats.Cdr and Aspose.Imaging.ImageOptions
  3. Set the license using SetLicense method before saving CDR image as PSD image
  4. Load the CorelDRAW CDR image file in CdrImage instance
  5. Set attributes of intended Photoshop PSD image using PsdOptions class instance
  6. Save the loaded CDR image file as PSD image on disk

In the above simple steps, we’re first loading a CDR image in CdrImage object using Load method of Image class. Once we have loaded the CDR image into the memory, we can save it to an output PSD image without using Photoshop. We can specify other attributes of the output PSD image as well.

Code to Export CorelDRAW CDR Image to Photoshop PSD Format in C#

In this example, we have used the default options for MultiPageOptions to merge and render all CDR pages in one PSD. There is other option to export each CDR image page as separate PSD by setting property MergeLayers to false. You can also change the enumerator value for SmoothingMode to set the quality of exported PSD image as well. Similarly, we can set other required properties or attributes to obtain varying quality PSD image.

In our previous topic, we explained the code to Create PNG image from BMP in C#.

 English