Convert PSD to JPG using C#
Contents
[
Hide
]
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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: