原創|產品更新|編輯:李顯亮|2021-05-14 11:23:06.760|閱讀 198 次
概述:Aspose.PSD for .Net更新至新版本v21.5,支持使用矢量路徑調整形狀圖層的大小,支持使用矢量路徑調整形狀圖層的大小,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.PSD是高級PSD和入門級AI文件格式操作API,允許創建和編輯Photoshop文件,并提供更新圖層屬性,添加水印,執行圖形操作或將一種文件格式轉換為另一種文件的功能,沒有任何Adobe Photoshop或Adobe Illustrator依賴項。
Aspose.PSD for .Net更新至新版本v21.5,支持使用矢量路徑調整形狀圖層的大小,支持使用矢量路徑調整形狀圖層的大小。
>>你可以點擊這里下載Aspose.PSD for .NET v21.5試用體驗。
key | 概述 | 類別 |
---|---|---|
PSDNET-758 | 支持使用矢量路徑調整形狀圖層的大小 | 功能 |
PSDNET-862 | 僅調整圖層大小時,支持使用矢量路徑調整形狀圖層的大小 | 功能 |
PSDNET-578 | 文本字符串被截斷 | Bug修復 |
PSDNET-758——支持使用矢量路徑調整形狀圖層的大小
string sourceFileName = "vectorShapes.psd"; string outputFileName = "out_vectorShapes.psd"; string dataDir = "PSDNET758_1"; string sourcePath = Path.Combine(dataDir, sourceFileName); string outputPath = Path.Combine(dataDir, outputFileName); using (var psdImage = (PsdImage)Image.Load(sourcePath)) { foreach (var layer in psdImage.Layers) { layer.Resize(layer.Width * 5 / 4, layer.Height / 2); } psdImage.Save(outputPath); psdImage.Save(Path.ChangeExtension(outputPath, ".png"), new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); }
PSDNET-862——僅調整圖層大小時,支持使用矢量路徑調整形狀圖層的大小
// This example shows how to resize layers with a Vogk and vector path resource in the PSD image float scaleX = 0.45f; float scaleY = 1.60f; string dataDir = "PSDNET862_1"; string sourceFileName = Path.Combine(dataDir, "vectorShapes.psd"); using (PsdImage image = (PsdImage)Image.Load(sourceFileName)) { for (int layerIndex = 1; layerIndex < image.Layers.Length; layerIndex++, scaleX += 0.25f, scaleY -= 0.25f) { var layer = image.Layers[layerIndex]; var newWidth = (int)Math.Round(layer.Width * scaleX); var newHeight = (int)Math.Round(layer.Height * scaleY); layer.Resize(newWidth, newHeight); Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); string outputName = string.Format("resized_{0}_{1}_{2}", layerIndex, scaleX, scaleY); string outputPath = Path.Combine(dataDir, outputName + ".psd"); string outputPngPath = Path.Combine(dataDir, outputName + ".png"); image.Save(outputPath, new PsdOptions(image)); image.Save(outputPngPath, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); } }
如果你想試用Aspose的全部完整功能,可聯系在線客服獲取30天臨時授權體驗。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn