ObjectArrayStructure Class
Defines the ObjectArrayStructure class that usually holds UnitArrayStructure array. It is used in the PSD file resources, such as PlLd Resource and SoLd Resource.
Inheritance Hierarchy

Namespace: Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 21.12
public sealed class ObjectArrayStructure : OSTypeStructure

The ObjectArrayStructure type exposes the following members.

Public propertyCode exampleClassID
Gets or sets the object array class ID.
Public propertyClassName
Gets or sets the object array class name.
Public propertyKey
Gets the object array structure key.
(Overrides OSTypeStructureKey.)
Public propertyKeyName
Gets or sets the key name.
(Inherited from OSTypeStructure.)
Public propertyLength
Gets the OSTypeStructure length in bytes.
(Overrides OSTypeStructureLength.)
Public propertyStructureCount
Gets the object array substructure count.
Public propertyCode exampleStructures
Gets or sets the substructures in the object array structure.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetHeaderLength
Gets the header length.
(Inherited from OSTypeStructure.)
Public methodGetType (Inherited from Object.)
Public methodSave
Saves the structure to the specified stream container.
(Inherited from OSTypeStructure.)
Public methodSaveWithoutKeyName
Saves the structure to the specified stream container.
(Inherited from OSTypeStructure.)
Public methodToString (Inherited from Object.)
Public fieldStatic memberStructureKey
Identifies the 'ObAr' structure key.
The following code demonstrates the support of the ObAr and UnFl signatures.

void AssertAreEqual(object actual, object expected)
    if (!object.Equals(actual, expected))
        throw new FormatException(string.Format("Actual value {0} are not equal to expected {1}.", actual, expected));

var sourceFilePath = "LayeredSmartObjects8bit2.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFilePath))
    UnitArrayStructure verticalStructure = null;
    foreach (Layer imageLayer in image.Layers)
        foreach (var imageResource in imageLayer.Resources)
            var resource = imageResource as PlLdResource;
            if (resource != null && resource.IsCustom)
                foreach (OSTypeStructure structure in resource.Items)
                    if (structure.KeyName.ClassName == "customEnvelopeWarp")
                        AssertAreEqual(typeof(DescriptorStructure), structure.GetType());
                        var custom = (DescriptorStructure)structure;
                        AssertAreEqual(custom.Structures.Length, 1);
                        var mesh = custom.Structures[0];
                        AssertAreEqual(typeof(ObjectArrayStructure), mesh.GetType());
                        var meshObjectArray = (ObjectArrayStructure)mesh;
                        AssertAreEqual(meshObjectArray.Structures.Length, 2);
                        var vertical = meshObjectArray.Structures[1];
                        AssertAreEqual(typeof(UnitArrayStructure), vertical.GetType());
                        verticalStructure = (UnitArrayStructure)vertical;
                        AssertAreEqual(verticalStructure.UnitType, UnitTypes.Pixels);
                        AssertAreEqual(verticalStructure.ValueCount, 16);


    AssertAreEqual(true, verticalStructure != null);
See Also