Aspose.PSD for .NET 22.4 - 发行说明

摘要 类别
PSDNET-261 外发光图层效果的渲染 特性
PSDNET-1123 添加对Sha256许可证的支持 增强功能
PSDNET-1107 多行文本定位与 Photoshop 中的结果不匹配 错误
PSDNET-1113 在文本资源数据解析中加载 PSD 文件时出现问题 错误
PSDNET-1129 将自定义模式保存为 PSD 后位置不正确 错误

公共 API 更改

已添加的 API:

  • T:Aspose.PSD.FileFormats.Psd.JustificationMode
  • F:Aspose.PSD.FileFormats.Psd.JustificationMode.Left
  • F:Aspose.PSD.FileFormats.Psd.JustificationMode.Right
  • F:Aspose.PSD.FileFormats.Psd.JustificationMode.Center
  • M:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.BlendingOptions.AddOuterGlow
  • T:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.FillColor
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.BlendMode
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.IsVisible
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Opacity
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Intensity
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.IsAntiAliasing
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Spread
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Size
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Noise
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.IsSoftBlend
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Range
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerEffects.OuterGlowEffect.Jitter

已移除的 API:

使用示例:

PSDNET-261. 外发光图层效果的渲染

string src = "GreenLayer.psd";
string output = "output261.png";

using (var image = (PsdImage)Image.Load(src))
{
    OuterGlowEffect effect = image.Layers[1].BlendingOptions.AddOuterGlow();
    effect.Range = 10;
    effect.Spread = 10;
    ((IColorFillSettings)effect.FillColor).Color = Color.Red;
    effect.Opacity = 128;
    effect.BlendMode = BlendMode.Normal;

    image.Save(output, new PngOptions());
}

PSDNET-1107. 多行文本定位与 Photoshop 中的结果不匹配

string src = "source1107.psd";
string outputPsd = "output.psd";
string outputPng = "output.png";

using (var image = (PsdImage)Image.Load(src))
{ 
   var txtLayer = image.AddTextLayer("Text line1\rText line2\rText line3", new Rectangle(200, 200, 500, 500));
   var portions = txtLayer.TextData.Items;

   portions[0].Paragraph.Justification = JustificationMode.Left;
   portions[1].Paragraph.Justification = JustificationMode.Right;
   portions[2].Paragraph.Justification = JustificationMode.Center;

   txtLayer.TextData.UpdateLayerData();

   image.Save(outputPsd);
   image.Save(outputPng, new PngOptions());
}

PSDNET-1113. 在文本资源数据解析中加载 PSD 文件时出现问题

string sourceFile = "input.psd";

using (PsdImage image = (PsdImage) Image.Load(sourceFile))
{
    // 加载成功。
}

PSDNET-1129. 将自定义模式保存为 PSD 后位置不正确

string sourceFile = "input_1129.psd";
string outputPsd = "out_psdnet1129.psd";
string outputPng = "out_psdnet1129.png";

using (PsdImage image = (PsdImage) Image.Load(sourceFile))
{
    image.Save(outputPsd);
    image.Save(outputPng, new PngOptions());
}