How to delete a layer in psd file?I didn’t find it in the method provided by psd. Is it not supported?
Can you please provide more details about the method you are using to delete a layer in the PSD file?
@zyyxiage please try using LINQ. It’s most comfy way for layers set editing for .NET:
using (var psdImage = (PsdImage)Image.Load(srcFile))
{
var layers = new List<Layer>(psdImage.Layers);
layers.RemoveAll(it => it.DisplayName == "B");
psdImage.Layers = layers.ToArray();
}