We are pleased to announce the Aspose.PSD for .NET 24.2 release (DLLs-only package)! With this update, .NET developers working with PSD manipulation can integrate exciting new features and enhancements into their C# and VB.NET solutions.
Better Manage The Angle Property for PatternFillSettings
Developers can experience greater control over the orientation of patterns used for fills. They can easily handle the angle property of PatternFillSettings
within their C# PSD processing applications, as illustrated in the following code sample:
string sourceFile = Path.Combine(baseFolder, "PatternFillLayerWide_0.psd");
string outputFile = Path.Combine(outputFolder, "PatternFillLayerWide_0_output.psd");
using (PsdImage image = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions { LoadEffectsResource = true }))
{
FillLayer fillLayer = (FillLayer)image.Layers[1];
PatternFillSettings fillSettings = (PatternFillSettings)fillLayer.FillSettings;
fillSettings.Angle = 70;
fillLayer.Update();
image.Save(outputFile, new PsdOptions());
}
using (PsdImage image = (PsdImage)Image.Load(outputFile, new PsdLoadOptions { LoadEffectsResource = true }))
{
FillLayer fillLayer = (FillLayer)image.Layers[1];
PatternFillSettings fillSettings = (PatternFillSettings)fillLayer.FillSettings;
Assert.AreEqual(70, fillSettings.Angle);
}
Source*
Scaling Text Layers in .NET
Accurately scale text layers with support for both vertical and horizontal adjustments in this .NET library release. Please check out the below-given code sample which showcases how to apply text layer scaling horizontally or vertically in C#:
string src = Path.Combine(baseFolder, "1719_src.psd");
string output = Path.Combine(outputFolder, "out_1719.png");
using (var psdImage = (PsdImage)Image.Load(src))
{
psdImage.Save(output, new PngOptions());
}
Source*
Render Backgrounds in AI Files Precisely
Aspose.PSD for .NET 24.2 offers consistent rendering precision for backgrounds in PDF-based AI formats within your C# image file manipulation applications. The following code example shows how to accurately render the background in AI files in C#:
string sourceFile = Path.Combine(baseFolder, "pineapples.ai");
string outputFilePath = Path.Combine(outputFolder, "pineapples.png");
using (AiImage image = (AiImage)Image.Load(sourceFile))
{
image.Save(outputFilePath, new PngOptions());
}
Source*
Quicker Warping
Enjoy a significantly faster warp effect application within your PSD files seamlessly with this .NET API release, as highlighted in the following C# code sample:
string sourceFile = Path.Combine(baseFolder, "output.psd");
string outputFile = Path.Combine(outputFolder, "export.png");
var opt = new PsdLoadOptions()
{
LoadEffectsResource = true,
AllowWarpRepaint = true
};
var sw = new Stopwatch();
sw.Start();
using (PsdImage img = (PsdImage)Image.Load(sourceFile, opt))
{
img.Save(outputFile, new PngOptions() { CompressionLevel = 9, ColorType = PngColorType.TruecolorWithAlpha });
}
sw.Stop();
// old value = 193300
// new value = 55500
int timeInSec = (int)sw.Elapsed.TotalMilliseconds;
if (timeInSec > 100000)
{
throw new Exception("Process time is too long");
}
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.PSD for .NET 24.2 Release Notes.