This MSI release of Aspose.PSD for .NET (v24.3) delivers new feature enhancements and bug fixes to upgrade your PSD and AI image processing tasks.
AI Image Loading Boost
Are you facing issues loading larger Adobe Illustrator (.AI) files in your C# and VB.NET solutions? This release of the .NET PSD API is here to help as it brings faster loading times for large, multi-page AI files.
Upgraded 8-bit to 16/32-bit Depth Conversion
In the latest version release, the issues causing file corruption when converting PSD files from 8-bit depth to 16-bit or 32-bit depth have been addressed. The following code sample showcases converting a PSD file from 8-bit to 16-bit in C#:
string sourceFile = Path.Combine(baseFolder, "test_smart_layer.psd");
string outputFile = Path.Combine(outputFolder, "export.psd");
using (var psdImage8 = (PsdImage)Image.Load(sourceFile))
{
var psdOptions16 = new PsdOptions()
{
ChannelBitsCount = 16
};
psdImage8.Save(outputFile, psdOptions16);
}
using (var psdImage16 = (PsdImage)Image.Load(outputFile))
{
if (psdImage16.GlobalLayerResources[0] is Lr16Resource)
{
// is ok
}
else
{
throw new Exception("Wrong global resource, the first resource should be Lr16Resource");
}
}
Source*
And this C# code example highlights how to convert a 16-bit PSD file to a 32-bit file:
string sourceFile = Path.Combine(baseFolder, "test_smart_layer.psd");
string outputFile = Path.Combine(outputFolder, "export.psd");
using (var psdImage8 = (PsdImage)Image.Load(sourceFile))
{
var psdOptions32 = new PsdOptions()
{
ChannelBitsCount = 32
};
psdImage8.Save(outputFile, psdOptions32);
}
using (var psdImage8 = (PsdImage)Image.Load(outputFile))
{
if (psdImage8.GlobalLayerResources[0] is Lr32Resource)
{
// is ok
}
else
{
throw new Exception("Wrong global resource, the first resource should be Lr32Resource");
}
}
Source*
Short Curve Rendering Accuracy in AI Files
Another important update in the latest C# PSD library release is the enhanced rendering of short curves within AI files. Please check out this code sample, which illustrates short curve rendering in C#:
string sourceFile = Path.Combine(baseFolder, "shortCurve.ai");
string outputFilePath = Path.Combine(outputFolder, "shortCurve.png");
using (AiImage image = (AiImage)Image.Load(sourceFile))
{
image.Save(outputFilePath, new PngOptions());
}
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.3 Release Notes.