How to Convert PSD to JPEG in C#

In this simple step by step tutorial, you’ll learn how to convert PSD to JPEG in C#. This application can be used to easily save PSD as JPEG using C# and this application can be used in any of the .NET Configured environments inside macOS, Linux or Windows.

Steps to Convert PSD to JPEG in C#

  1. Configure your environment by installing Aspose.PSD for .NET from NuGet
  2. Access the source PSD file from the disk using the PsdImage class instance
  3. Use the JpegOptions class to set the desired JPEG properties
  4. Save the PSD as JPEG file on the disk

In C# PSD to JPEG image conversion can be easily performed using the above mentioned steps, whereby the process will kick off by loading the source PSD file from the disk. Then by using an instance of the JpegOptions class, different properties for the desired JPEG image file will be set. Finally, the loaded PSD will be saved as a JPEG file on the disk using the Save method.

Code to Export PSD to JPEG in C#

In the aforementioned example, the process of converting PSD to JPG using C# is demonstrated where the Image.Load() method is used to access the source PSD file from the disk. The JpegOptions class is used to set the properties like Jpeg quality, JpegLsAllowedLossyError, VectorRasterizationOptions and ResolutionSettings to name a few. Based on the set JPEG properties, the JPEG file will be saved either on the disk or inside the MemoryStream.

In this sample, we learned about the process of converting PSD to JPEG using C# in a stepwise manner. If you are interested in learning about adding an image watermark to PSD, refer to the article on how to add Image Watermark to PSD in C#.

 English