We are thrilled to announce the release of Aspose.PSD for .NET 24.2 (MSI installer)! This update delivers exciting new features, enhancements, and bug fixes to empower .NET developers working with PSD files.
Handle Angle Property for PatternFillSettings
.NET developers can enjoy more control over the orientation of patterns used for fills. They can now manage the angle property of PatternFillSettings
within their C# and VB.NET 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*
Text Layer Scaling
Aspose.PSD for .NET 24.2 allows users to precisely manage text layer scaling with support for both vertical and horizontal adjustments. 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*
Accurate Rendering of Backgrounds in AI Files
Experience consistent rendering accuracy 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*
Faster Warping
You can now enjoy significant performance improvements and quicker processing when applying warp effects to your PSD files effortlessly, 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.