Convert PSD to JPG using C#
C# .NET Photoshop Manipulation API - Aspose.PSD is a PSD Format SDK, that allows you easily convert Adobe Photoshop File PSD to JPG file. You need to use following code snippet to do the job:
Below provided sample code demonstrates how to convert PSD to Jpg:
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
string inputFile = dataDir + "PsdConvertToExample.psd"; | |
using (var psdImage = (PsdImage)Image.Load(inputFile)) | |
{ | |
psdImage.Save(dataDir + "PsdConvertedToJpg.jpg", new JpegOptions() {Quality = 80, JpegLsAllowedLossyError = 10 }); | |
} |
You can specify JPEG File Format quality, JPEG Allowed Lossy Error, and other parameters of PSD export to JPG.
You can export PSD file after the editing or pixel-perfect in Read-Only Mode, where will be used PSD File Preview.
Here the example of export Photoshop Gradient and PSD Text Layer: