使用 C# 将 PSD 转换为 JPG

Contents
[ ]

C# .NET Photoshop Manipulation API - Aspose.PSD 是一种 PSD 格式 SDK,允许您轻松将 Adobe Photoshop 文件 PSD 转换为 JPG 文件。您需要使用以下代码片段来执行此操作:

下面提供的示例代码演示了如何将 PSD 转换为 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 });
}

您可以指定 JPEG 文件格式质量、JPEG 允许的有损误差以及 PSD 导出为 JPG 的其他参数。

您可以在编辑 PSD 文件后或以像素完美的方式以只读模式导出 PSD 文件,其中将使用 PSD 文件预览。

这里是导出Photoshop 渐变PSD 文本图层的示例效果:

todo:image_alt_text