ShmdResource.SubResources
ShmdResource.SubResources property
Gets the sub resources of shmd resource.
public LayerResource[] SubResources { get; }
Examples
The following code demonstrates support of MlstResource resource that gives a low-level mechanism to manipulate the layer states.
[C#]
string sourceFile = "image1219.psd";
string outputPsd = "output_image1219.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
Layer layer1 = image.Layers[1];
ShmdResource shmdResource = (ShmdResource)layer1.Resources[8];
MlstResource mlstResource = (MlstResource)shmdResource.SubResources[0];
ListStructure layerStatesList = (ListStructure)mlstResource.Items[1];
DescriptorStructure layersStateOnFrame1 = (DescriptorStructure)layerStatesList.Types[1];
BooleanStructure layerEnabled = (BooleanStructure)layersStateOnFrame1.Structures[0];
// Disable layer 1 on frame 1
layerEnabled.Value = false;
image.Save(outputPsd);
}
See Also
- class LayerResource
- class ShmdResource
- namespace Aspose.PSD.FileFormats.Psd.Layers.LayerResources
- assembly Aspose.PSD