原創|產品更新|編輯:李顯亮|2020-04-03 11:38:17.440|閱讀 265 次
概述:令人興奮的是,.NET版Aspose.PSD迎來了3月的最新更新!新增了如下六大新功能:支持.Net Core、將Adobe Illustrator文件轉換為PDF、增加在一個文本層中呈現不同樣式的功能、支持黑白調整層、添加對導出AI格式(版本8)的支持,以支持其他格式、支持PassThrough混合模式處理(僅用于圖層組) 。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.PSD for .Net是高級PSD和入門級AI文件格式操作API,允許創建和編輯Photoshop文件,并提供更新圖層屬性,添加水印,執行圖形操作或將一種文件格式轉換為另一種文件的功能,沒有任何Adobe Photoshop或Adobe Illustrator依賴項。
令人興奮的是,.NET版Aspose.PSD迎來了3月的最新更新!新增了如下六大新功能:
>>你可以點擊這里下載Aspose.PSD for .NET v20.2測試體驗
key | 概述 | 類別 |
---|---|---|
PSDNET-188 | 支持.Net Core | 新功能 |
PSDNET-523 | 將Adobe Illustrator文件轉換為PDF | 新功能 |
PSDNET-212 | 增加在一個文本層中呈現不同樣式的功能 | 新功能 |
PSDNET-144 | 支持黑白調整層 | 新功能 |
PSDNET-233 | 添加對導出AI格式(版本8)的支持,以支持其他格式 | 新功能 |
PSDNET-540 | 支持PassThrough混合模式處理(僅用于圖層組) | 新功能 |
PSDNET-539 | 異常:加載具有空Unicode Alpha名稱資源的圖像時,圖像加載失敗 | Bug修復 |
PSDNET-541 | 更改LayerGroup的可見性后輸出不正確 | Bug修復 |
PSDNET-516 | 加載PSD圖像時的異常:顏色部分(DropShadow資源)必須包含RGB的3個顏色分量或CMYK的4個顏色分量 | Bug修復 |
PSDNET-536 | 如果使用簡單版本的Constructor嘗試在新創建的圖層上繪制,則為異常 | Bug修復 |
string sourceFile = "rect2_color.ai"; using (var aiImage = (AiImage)Image.Load(sourceFile)) { aiImage.Save("rect2_color.ai_output.pdf", new PdfOptions()); }
string sourceFile = "text212.psd"; string ethalonFile = "Ethalon_text212.psd"; string outputFile = "Output_text212.psd"; using (var img = (PsdImage)Image.Load(sourceFile)) { TextLayer textLayer = (TextLayer)img.Layers[1]; IText textData = textLayer.TextData; ITextStyle defaultStyle = textData.ProducePortion().Style; ITextParagraph defaultParagraph = textData.ProducePortion().Paragraph; defaultStyle.FillColor = Color.DimGray; defaultStyle.FontSize = 51; textData.Items[1].Style.Strikethrough = true; ITextPortion[] newPortions = textData.ProducePortions(new string[] { "E=mc", "2\r", "Bold", "Italic\r", "Lowercasetext" }, defaultStyle, defaultParagraph); newPortions[0].Style.Underline = true; // edit text style "E=mc" newPortions[1].Style.FontBaseline = FontBaseline.Superscript; // edit text style "2\r" newPortions[2].Style.FauxBold = true; // edit text style "Bold" newPortions[3].Style.FauxItalic = true; // edit text style "Italic\r" newPortions[3].Style.BaselineShift = -25; // edit text style "Italic\r" newPortions[4].Style.FontCaps = FontCaps.SmallCaps; // edit text style "Lowercasetext" foreach (var newPortion in newPortions) { textData.AddPortion(newPortion); } textData.UpdateLayerData(); img.Save(outputFile); }
voidAssertIsTrue(bool condition, string message) { if(!condition) { thrownewFormatException(message); } } string sourceFileName ="Apple.psd"; string outputFileName ="Output"+ sourceFileName; using (PsdImage image = (PsdImage)Image.Load(sourceFileName)) { AssertIsTrue(image.Layers.Length >=23,"There is not 23rd layer."); var layer = image.Layers[23] as LayerGroup; AssertIsTrue(layer !=null,"The 23rd layer is not a layer group."); AssertIsTrue(layer.Name =="AdjustmentGroup","The 23rd layer name is not 'AdjustmentGroup'."); AssertIsTrue(layer.BlendModeKey == BlendMode.PassThrough,"AdjustmentGroup layer should have 'pass through' blend mode."); image.Save(outputFileName,newPsdOptions()); image.Save("OutputApple.png",newPngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); layer.BlendModeKey = BlendMode.Normal; image.Save("Normal"+ outputFileName,newPsdOptions()); image.Save("NormalOutputApple.png",newPngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); }
// Example of exporting AI file to PSD and PNG format string sourceFileName = "form_8.ai"; string outputFileName = "form_8_export"; using (AiImage image = (AiImage)Image.Load(sourceFileName)) { image.Save(outputFileName + ".psd", new PsdOptions()); image.Save(outputFileName + ".png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); }
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn