PSD Layer

Overview

Adobe® Photoshop® PSD Layer is one of the best concepts in graphics processing. Layers contain information about pixels, can have a different count of channels.

One of the most important parts of Layer in Photoshop Document is Layer Resources. You get the full list of supported Layer Resources in PSD from our documentation.

You can find UI to manipulate the layer on the following screenshot:

todo:image_alt_text

But Aspose.PSD specializes on programmatic manipulation of PSD Layer via C# and Java.

Additional documentation can be found in this Article: Manipulating Images. All manipulation can be processed to PSD Preview and Layer, you find more info inAspose.PSD Raster Image API Reference.

Available PSD Layer API

  • Layer Effects
  • Layers common properties
  • Layer Metadata

Examples of Layer Editing via C#

Adding of new Layer

If you want to add an empty Layer to opened PSD File you can use the following code.

Add new Layer to PSD File using API

Adding of new Layer from Jpeg, Png, Gif, Ai, Tiff, Bmp files

Files of any supported formats can be added as a new layer to your image. But you can’t load it directly.

You can the code below to add new PSD Layer from the file of any supported format from the stream

Flatten all layers or layer groups

It can be useful if you don’t want to give an editable PSD file to your users. Also, you can identify through API if the file was flattened.

Layer Flattening of PSD File: