Aspose.PSD for Python via .NET 24.8 - 릴리스 노트
Contents
[
Hide
]
이 페이지에는 Aspose.PSD for Python via .NET 24.8의 릴리스 노트가 포함되어 있습니다.
키 | 요약 | 범주 |
---|---|---|
PSDPYTHON-81 | [AI 포맷] XObject 그룹 처리 추가 | 향상 |
PSDPYTHON-82 | Warp 변환 기능을 향상시켜 TextLayer 및 SmartObjectLayer용 WarpSettings 추가 | 기능 |
PSDPYTHON-83 | [AI 포맷] 컨텐츠 스트림 연산자 내의 레이어 처리 | 기능 |
PSDPYTHON-84 | AI 파일의 렌더링 결과가 Illustrator 결과와 매우 다름 | 버그 |
PSDPYTHON-85 | Smart Object 다시 연결이 PSD 파일의 모든 Smart Object에 적용되지 않음 | 버그 |
퍼블릭 API 변경 내용
추가된 API:
- P:Aspose.PSD.FileFormats.Psd.Layers.TextLayer.WarpSettings
- P:Aspose.PSD.FileFormats.Psd.Layers.SmartObjects.SmartObjectLayer.WarpSettings
- T:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings
- M:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.#ctor(Aspose.PSD.FileFormats.Psd.Layers.LayerResources.OSTypeStructure[],Aspose.PSD.Rectangle)
- M:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.#ctor(Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedResource)
- P:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.Style
- P:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.Rotate
- P:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.Value
- P:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.Bounds
- P:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpSettings.MeshPoints
- T:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpRotates
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpRotates.Horizontal
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpRotates.Vertical
- T:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.None
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Custom
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Arc
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.ArcUpper
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.ArcLower
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Arch
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Bulge
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Flag
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Fish
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Rise
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Wave
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Twist
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Squeeze
- F:Aspose.PSD.FileFormats.Psd.Layers.Warp.WarpStyles.Inflate
제거된 API:
- 없음
사용 예시:
PSDPYTHON-81. [AI Format] XObject 그룹 처리 추가
#예시 없음. 내부적인 개선입니다.
PSDPYTHON-82. TextLayer 및 SmartObjectLayer용 WarpSettings 추가로 Warp 변환 기능 향상
sourceFile = "smart_without_warp.psd"
opt = PsdLoadOptions()
opt.load_effects_resource = True
opt.allow_warp_repaint = True
outputImageFile = [None] * 4
outputPsdFile = [None] * 4
pngOpt = PngOptions()
pngOpt.compression_level = 9
pngOpt.color_type = PngColorType.TRUECOLOR_WITH_ALPHA
for caseIndex in range(len(outputImageFile)):
outputImageFile[caseIndex] = "export_" + str(caseIndex) + ".png"
outputPsdFile[caseIndex] = "export_" + str(caseIndex) + ".psd"
with PsdImage.load(sourceFile, opt) as image:
img = cast(PsdImage, image)
for layer in img.layers:
if is_assignable(layer, SmartObjectLayer):
smartLayer = cast(SmartObjectLayer, layer)
smartLayer.warp_settings = GetWarpSettingsByIndex(smartLayer.warp_settings, caseIndex)
if is_assignable(layer, TextLayer):
textLayer = cast(TextLayer, layer)
if caseIndex != 3:
textLayer.warp_settings = GetWarpSettingsByIndex(textLayer.warp_settings, caseIndex)
img.save(outputPsdFile[caseIndex], PsdOptions())
img.save(outputImageFile[caseIndex], PsdOptions())
with PsdImage.load(outputPsdFile[caseIndex], opt) as img:
img.save(outputImageFile[caseIndex], pngOpt)
def GetWarpSettingsByIndex(warpParams, caseIndex):
switcher = {
0: {"Style": WarpStyles.RISE, "Rotate": WarpRotates.HORIZONTAL, "Value": 20},
1: {"Style": WarpStyles.RISE, "Rotate": WarpRotates.VERTICAL, "Value": 10},
2: {"Style": WarpStyles.FLAG, "Rotate": WarpRotates.HORIZONTAL, "Value": 30},
3: {"Style": WarpStyles.CUSTOM}
}
params = switcher.get(caseIndex)
if params:
warpParams.style = params.get("Style")
if params.get("Rotate") is not None:
warpParams.rotate = params.get("Rotate")
if params.get("Value") is not None:
warpParams.value = params.get("Value")
if caseIndex == 3:
warpParams.mesh_points[2].y += 70
return warpParams
PSDPYTHON-83. [AI Format] 컨텐츠 스트림 연산자 내의 레이어 처리
sourceFile = "Layers-NoPen.ai"
outputFile = "Layers-NoPen.output.png"
with AiImage.load(sourceFile) as image:
image.save(outputFile, PngOptions())
PSDPYTHON-84. AI 파일의 렌더링 결과가 Illustrator 결과와 매우 다름
sourceFile = "4.ai"
outputFile = "4_output.png"
referenceFile = "4_ethalon.png"
with AiImage.load(sourceFile) as image:
image.save(outputFile, PngOptions())
PSDPYTHON-85. Smart Object 다시 연결이 PSD 파일의 모든 Smart Object에 적용되지 않음
files = ["simple_test", "w22"]
change_file = "image(19).png"
for file in files:
source_file = file + ".psd"
output_file = file + "_output.psd"
with Image.load(source_file) as img:
image = cast(PsdImage, img)
for layer in image.layers:
if is_assignable(layer, SmartObjectLayer):
smart_layer = cast(SmartObjectLayer, layer)
smart_layer.replace_contents(change_file)
image.save(output_file)