Aspose.PSD for Java 20.7 - 发行说明

关键 摘要 类别
PSDJAVA-231 支持在运行时添加描边效果 功能
PSDJAVA-249 支持lnk2/lnk3资源(智能对象图层资源) 功能
PSDJAVA-247 更改尝试以图像打开不受支持格式时的异常消息 增强功能
PSDJAVA-235 在创建新图层组后保存PSD文件会在文件打开时收到Photoshop警告 错误
PSDJAVA-236 无法保存图层蒙版 错误
PSDJAVA-237 剪切蒙版不适用于文件夹 错误
PSDJAVA-238 无法使用Aspose.PSD for Java打开文件 错误
PSDJAVA-239 将PSD转换为PDF时图像保存失败的异常 错误
PSDJAVA-240 裁剪操作使PSD图像中的剪切路径无效 错误
PSDJAVA-241 尝试保存带有阴影效果的特定PSD文件时发生NullReference异常 错误
PSDJAVA-243 Aspose.PSD返回true时Image.CanLoad(pdfStream) 错误
PSDJAVA-244 生成的PNG中图层无法渲染 错误
PSDJAVA-245 访问TextData时发生异常 错误
PSDJAVA-246 保存PSD时出现ImageSaveException异常 错误

公共API更改

已添加的API:

  • F:com.aspose.psd.fileformats.psd.layers.layereffects.StrokePosition.Center
  • F:com.aspose.psd.fileformats.psd.layers.layereffects.StrokePosition.Inside
  • F:com.aspose.psd.fileformats.psd.layers.layereffects.StrokePosition.Outside
  • F:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk3Resource.TypeToolKey
  • M:com.aspose.psd.fileformats.psd.PsdImage.addExposureAdjustmentLayer
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.BlendingOptions.addStroke(int)
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.getOverprint
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.getPosition
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.getSize
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.setOverprint(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.setPosition(short)
  • M:com.aspose.psd.fileformats.psd.layers.layereffects.StrokeEffect.setSize(int)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LiFdDataSource.getData
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LiFdDataSource.setData(byte[])
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk2Resource.#ctor
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk2Resource.get_Item(int)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk3Resource.#ctor
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk3Resource.getKey
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.getPaths
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.getVersion
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.isDisabled
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.isInverted
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.isNotLinked
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.setDisabled(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.setInverted(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.setNotLinked(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.setPaths(com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathRecord[])
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData.setVersion(int)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.#ctor
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.#ctor(byte[])
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.getLength
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.getPaths
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.getVersion
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.isDisabled
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.isInverted
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.isNotLinked
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.setDisabled(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.setInverted(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.setNotLinked(boolean)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.setPaths(com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathRecord[])
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData.setVersion(int)
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.#ctor(byte[])
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.getDataSize
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.getMinimalVersion
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.getPaths
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.getVersion
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.isDisabled
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.isInverted
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.isNotLinked
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.saveData(com.aspose.psd.StreamContainer)
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.setDisabled(boolean)
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.setInverted(boolean)
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.setNotLinked(boolean)
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.setPaths(com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathRecord[])
  • M:com.aspose.psd.fileformats.psd.resources.WorkingPathResource.setVersion(int)
  • T:com.aspose.psd.fileformats.psd.layers.layereffects.StrokePosition
  • T:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk3Resource
  • T:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.IVectorPathData
  • T:com.aspose.psd.fileformats.psd.layers.layerresources.vectorpaths.VectorPathData
  • T:com.aspose.psd.fileformats.psd.resources.WorkingPathResource

已移除的API:

  • F:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LinkDataSource.DescriptorVersion
  • F:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LinkDataSource.UnexpectedLinkResourceTypeValue
  • F:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LinkDataSource.ZeroChar
  • M:com.aspose.psd.fileformats.psd.PsdImage.addExposureLayer(float,float,float)
  • M:com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.Lnk2Resource.#ctor(com.aspose.psd.fileformats.psd.layers.layerresources.linkresources.LinkDataSource[])

用法示例:

PSDJAVA-231. 支持在运行时添加描边效果

// 此示例演示如何在Java中向PSD文件的现有图层添加描边效果(边框)。
// 描边有三种类型:颜色、渐变和模式。每种类型有三种在其中将描边呈现的方法:内部、中心和外部。
// 此示例演示所有这些情况的用法。

String srcPsdPath = "StrokeEffectsSource.psd";
String dstPngPath = "output.png";

PsdLoadOptions psdLoadOptions = new PsdLoadOptions();
psdLoadOptions.setLoadEffectsResource(true);
PsdImage psdImage = (PsdImage)Image.load(srcPsdPath, psdLoadOptions);
try {
    StrokeEffect strokeEffect;
    IColorFillSettings colorFillSettings;
    IGradientFillSettings gradientFillSettings;
    IPatternFillSettings patternFillSettings;

    // 1. 添加颜色填充,位置在内部
    strokeEffect = psdImage.getLayers()[1].getBlendingOptions().addStroke(FillType.Color);
    strokeEffect.setSize(7);
    strokeEffect.setPosition(StrokePosition.Inside);
    colorFillSettings = (IColorFillSettings)strokeEffect.getFillSettings();
    colorFillSettings.setColor(Color.getGreen());

    // 其他用法请参考原文
}
finally {
    psdImage.dispose();
}

(以下用法示例请参考原文)PSDJAVA-249. 支持lnk2 / lnk3资源(智能对象图层资源)

// 此示例演示如何使用智能对象资源(基本上是Lnk2Resource)。
// 该程序加载多个Photoshop文档并将其智能对象导出为栅格文件格式。此外,代码演示了Lnk2Resource的公共方法的用法。

// 请参考原文进行代码

PSDJAVA-247. 尝试以图像打开不受支持格式时更改异常消息

// 此示例展示在以不受支持的方式(只能将栅格图像作为图层加载)加载栅格图像时引发带有新更具描述性消息的异常。

// 请参考原文进行代码

(以下用法示例请参考原文继续)