原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2021-05-14 11:23:06.760|閱讀 198 次
概述:Aspose.PSD for .Net更新至新版本v21.5,支持使用矢量路徑調(diào)整形狀圖層的大小,支持使用矢量路徑調(diào)整形狀圖層的大小,歡迎下載體驗(yàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷(xiāo)售中 >>
Aspose.PSD是高級(jí)PSD和入門(mén)級(jí)AI文件格式操作API,允許創(chuàng)建和編輯Photoshop文件,并提供更新圖層屬性,添加水印,執(zhí)行圖形操作或?qū)⒁环N文件格式轉(zhuǎn)換為另一種文件的功能,沒(méi)有任何Adobe Photoshop或Adobe Illustrator依賴項(xiàng)。
Aspose.PSD for .Net更新至新版本v21.5,支持使用矢量路徑調(diào)整形狀圖層的大小,支持使用矢量路徑調(diào)整形狀圖層的大小。
>>你可以點(diǎn)擊這里下載Aspose.PSD for .NET v21.5試用體驗(yàn)。
key | 概述 | 類(lèi)別 |
---|---|---|
PSDNET-758 | 支持使用矢量路徑調(diào)整形狀圖層的大小 | 功能 |
PSDNET-862 | 僅調(diào)整圖層大小時(shí),支持使用矢量路徑調(diào)整形狀圖層的大小 | 功能 |
PSDNET-578 | 文本字符串被截?cái)?/span> | Bug修復(fù) |
PSDNET-758——支持使用矢量路徑調(diào)整形狀圖層的大小
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——僅調(diào)整圖層大小時(shí),支持使用矢量路徑調(diào)整形狀圖層的大小
// 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的全部完整功能,可聯(lián)系在線客服獲取30天臨時(shí)授權(quán)體驗(yàn)。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn