Browse our Products

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

 

Aspose.PSD for .NET 24.6

Download  Support Forum 

File Details

  • Downloads:
  • 1
  • File Size:
  • 31.43MB
  • Date Added:
  • 6/6/2024

Description

It contains Aspose.PSD for .NET 24.6 (MSI) release.

File Details

Aspose.PSD for .NET 24.6 (MSI installer) enables adding new features to your image processing solutions and enhances their capabilities. This release introduces Gradient Map adjustments, XMP data access for AI files, support for Inflate, Squeeze, and Twist warp types, and more updates.

Gradient Map Support

Build image manipulation applications with the ability to provide stunning visual effects. This is made possible with the gradient map support feature in this release of the C# PSD manipulation library. It allows you to effortlessly create catchy color adjustments, as showcased in the following C# code example:


string sourceFile = Path.Combine(baseFolder, "gradient_map_src.psd");
string outputFile = Path.Combine(outputFolder, "gradient_map_src_output.psd");

using (PsdImage im = (PsdImage)Image.Load(sourceFile))
{
    // Add Gradient map adjustment layer.
    GradientMapLayer layer = im.AddGradientMapAdjustmentLayer();
    layer.GradientSettings.Reverse = true;

    im.Save(outputFile);
}

// Check saved changes
using (PsdImage im = (PsdImage)Image.Load(outputFile))
{
    GradientMapLayer gradientMapLayer = im.Layers[1] as GradientMapLayer;
    GradientFillSettings gradientSettings = (GradientFillSettings)gradientMapLayer.GradientSettings;

    AssertAreEqual(0.0, gradientSettings.Angle);
    AssertAreEqual((short)4096, gradientSettings.Interpolation);
    AssertAreEqual(true, gradientSettings.Reverse);
    AssertAreEqual(false, gradientSettings.AlignWithLayer);
    AssertAreEqual(false, gradientSettings.Dither);
    AssertAreEqual(GradientType.Linear, gradientSettings.GradientType);
    AssertAreEqual(100, gradientSettings.Scale);
    AssertAreEqual(0.0, gradientSettings.HorizontalOffset);
    AssertAreEqual(0.0, gradientSettings.VerticalOffset);
    AssertAreEqual("Custom", gradientSettings.GradientName);
}

void AssertAreEqual(object expected, object actual, string message = null)
{
    if (!object.Equals(expected, actual))
    {
        throw new Exception(message ?? "Objects are not equal.");
    }
}

Source*

AI XMP Metadata Access

Aspose.PSD for .NET 24.6 lets you extract valuable XMP metadata from Adobe Illustrator (AI) files for comprehensive image file analysis. This code example highlights how to perform the metadata extraction in C#:


string sourceFile = Path.Combine(baseFolder, "ai_one.ai");

void AssertAreEqual(object expected, object actual)
{
    if (!object.Equals(expected, actual))
    {
        throw new Exception("Objects are not equal.");
    }
}

void AssertIsNotNull(object testObject)
{
    if (testObject == null)
    {
        throw new Exception("Test object are null.");
    }
}

string creatorToolKey = ":CreatorTool";
string nPagesKey = "xmpTPg:NPages";
string unitKey = "stDim:unit";
string heightKey = "stDim:h";
string widthKey = "stDim:w";

string expectedCreatorTool = "Adobe Illustrator CC 22.1 (Windows)";
string expectedNPages = "1";
string expectedUnit = "Pixels";
double expectedHeight = 768;
double expectedWidth = 1366;

using (AiImage image = (AiImage)Image.Load(sourceFile))
{
    // Xmp Metadata was added.
    var xmpMetaData = image.XmpData;

    AssertIsNotNull(xmpMetaData);

    // No we can get access to Xmp Packages of AI files.
    var basicPackage = xmpMetaData.GetPackage(Namespaces.XmpBasic) as XmpBasicPackage;
    var package = xmpMetaData.Packages[4];

    // And we have access to the content of these packages.
    var creatorTool = basicPackage[creatorToolKey].ToString();
    var nPages = package[nPagesKey];
    var unit = package[unitKey];
    var height = double.Parse(package[heightKey].ToString(), CultureInfo.InvariantCulture);
    var width = double.Parse(package[widthKey].ToString(), CultureInfo.InvariantCulture);

    AssertAreEqual(creatorTool, expectedCreatorTool);
    AssertAreEqual(nPages, expectedNPages);
    AssertAreEqual(unit, expectedUnit);
    AssertAreEqual(height, expectedHeight);
    AssertAreEqual(width, expectedWidth);
}

Source*

New Warp Effects

Add a touch of creativity to your solutions by enabling users to distort images with the addition of Inflate, Squeeze, and Twist warp effects. Please check out this sample coding to learn how to use this feature:


string[] files = { "Twist", "Squeeze", "Squeeze_vert", "Inflate" };

foreach (string prefix in files)
{
    string sourceFile = Path.Combine(baseFolder, prefix + ".psd");
    string outputFile = Path.Combine(outputFolder, prefix + "_export.png");

    using (var psdImage = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions() { AllowWarpRepaint = true, LoadEffectsResource = true }))
    {
        psdImage.Save(outputFile, new PngOptions
        {
            ColorType = PngColorType.TruecolorWithAlpha
        });
    }
}

Source*

Improved PSD Format Handling

Version 24.6 of the .NET PSD API ensures proper handling of PSD files with RGB and Lab color modes containing specific channel configurations and processing area top values. The following code example illustrates the feature usage in C#:


string sourceFile = Path.Combine(baseFolder, "Rgb5Channels.psb");
string outputFile = Path.Combine(outputFolder, "Rgb5Channels_output.psd");

using (PsdImage image = (PsdImage)Aspose.PSD.Image.Load(sourceFile))
{
    // Here should be no exception
    image.Save(outputFile);
}

Source*

Bug Fixes

We have resolved the issues causing data loss while saving expanded canvas images in the latest release of the C# library.

You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.PSD for .NET 24.6 Release Notes.

 English