Introduction

Aspose.PSD FOSS for .NET is a new open-source library for working with PSD and PSB (Photoshop large document) files from .NET code. It is released under the MIT license, requires only .NET 10.0 at runtime, and has no other third-party dependencies. The package is imported with using Aspose.PSD.FOSS;.

The library is organized around the PsdImage class, which extends the abstract Image base class, and the Layer class. Image.Load() / PsdImage.Load() load a document from a file path or a stream, exposing header information (Width, Height, ColorMode, Version, Compression) and the parsed Layers collection; PsdImage.Save() writes the document back out to a file or stream. Each Layer exposes its own metadata — Name, Bounds, IsVisible, Opacity, Clipping, BlendModeKey, and channel/mask information — and a subset of these properties can be changed in place and saved back to the file.

This release is for developers who need to inspect or make limited metadata edits to PSD/PSB files inside a .NET codebase without a commercial license — asset-pipeline tooling that reports on layer structure, build scripts that rename or toggle layer visibility before handoff, or test fixtures that need to read PSD header and layer data without a full rendering engine. The library does not render pixel data or convert PSD/PSB to other image formats — it is a metadata-focused reader/writer for the PSD/PSB container format.


What’s Included

Document Inspection

PsdImage.Load() parses a PSD or PSB file’s header into typed properties — Width, Height, BitsPerChannel, ColorMode, Version, Compression, Size, and IsFlatten — without decoding pixel data.

using var image = (PsdImage)Image.Load(inputPath);
Console.WriteLine($"Width: {image.Width}, Height: {image.Height}");
Console.WriteLine($"ColorMode: {image.ColorMode}, Version: {image.Version}");
Console.WriteLine($"Layers: {image.Layers.Length}, Compression: {image.Compression}");

Layer Metadata

Each entry in PsdImage.Layers is a Layer exposing its own bounds, visibility, opacity, clipping, and blend-mode metadata.

foreach (var layer in image.Layers)
{
    Console.WriteLine($"{layer.Name}: {layer.Bounds}, Visible={layer.IsVisible}, Opacity={layer.Opacity}");
}

Supported Metadata Edits

A subset of layer properties can be changed in place and written back with PsdImage.Save(): name, visibility, opacity, clipping, blend mode key, and the four bounds edges.

Layer layer = image.Layers[0];
layer.Name = $"{layer.Name} (edited)";
layer.IsVisible = !layer.IsVisible;
layer.Opacity = 128;
layer.BlendModeKey = BlendMode.Multiply;
image.Save(outputPath);

Quick Start

Install the package, then load a PSD or PSB file, inspect its layers, and save it back out:

git clone https://github.com/aspose-psd-foss/Aspose.PSD-FOSS-for-.NET.git
cd Aspose.PSD-FOSS-for-.NET
dotnet build
using Aspose.PSD.FileFormats.Psd;

using var image = (PsdImage)Image.Load("input.psd");
Console.WriteLine($"Width: {image.Width}, Height: {image.Height}, Layers: {image.Layers.Length}");

foreach (var layer in image.Layers)
{
    Console.WriteLine($"  {layer.Name}: {layer.Bounds}");
}

image.Save("output.psd");

Supported Formats

FormatExtensionReadWrite
Photoshop Documentpsd✓✓
Photoshop Large Documentpsb✓✓

Open Source & Licensing

Aspose.PSD FOSS for .NET is MIT licensed and may be used in commercial products without royalties, with no evaluation watermark or usage limit.

The package is at version 1.0.0 and requires only .NET 10.0 at runtime — it has no other third-party dependencies.


Getting Started