LayerAndMaskSection
Overview
LayerAndMaskSection is a class in Aspose.PSD FOSS for Java.
Represents the PSD/PSB Layer and Mask Information section and its raw-preserved save state.
This class declares 14 methods for LayerAndMaskSection objects in Java programs.
Available methods include: LayerAndMaskSection, equals, getLayerChannelImageDataRaw, getLayerCountRaw, getLayerGlobalMaskAndTailRaw, getLayers, getRawSectionBytes, hashCode, isHasLayerCollectionMutated, load, save, toString, and 1 additional methods.
Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package.
Properties: EMPTY, hasLayerCollectionMutated, layerChannelImageDataRaw, layerCountRaw, layerGlobalMaskAndTailRaw, layers, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
rawSectionBytes | byte[] | Read | Gets the raw section payload without the outer length field. |
layerChannelImageDataRaw | byte[] | Read | Gets the raw layer channel image data payload after layer records. |
layerGlobalMaskAndTailRaw | byte[] | Read | Gets the raw global mask info and trailing section bytes. |
layerCountRaw | short | Read | Gets the original signed layer count so transparency-protected layers can preserve sign. |
layers | Layer[] | Read | Gets the parsed layer records. |
hasLayerCollectionMutated | boolean | Read | Gets a value indicating whether the public layer collection was replaced. |
EMPTY | LayerAndMaskSection | Read | An empty Layer and Mask Information section. |
Methods
| Signature | Description |
|---|---|
LayerAndMaskSection(rawSectionBytes: byte[], layerChannelImageDataRaw: byte[], layerGlobalMaskAndTailRaw: byte[], layerCountRaw: short, layers: Layer[], hasLayerCollectionMutated: boolean) | Creates a new instance of the LayerAndMaskSection class. |
LayerAndMaskSection(rawSectionBytes: byte[], layerChannelImageDataRaw: byte[], layerGlobalMaskAndTailRaw: byte[], layerCountRaw: short, layers: Layer[]) | Convenience constructor mirroring the C# default parameter. |
getRawSectionBytes() → byte[] | Gets the raw section payload without the outer length field. |
getLayerChannelImageDataRaw() → byte[] | Gets the raw layer channel image data payload after layer records. |
getLayerGlobalMaskAndTailRaw() → byte[] | Gets the raw global mask info and trailing section bytes. |
getLayerCountRaw() → short | Gets the original signed layer count so transparency-protected layers can preserve sign. |
getLayers() → Layer[] | Gets the parsed layer records. |
isHasLayerCollectionMutated() → boolean | Gets a value indicating whether the public layer collection was replaced. |
load(reader: BigEndianReader, isLargeDocument: boolean) → LayerAndMaskSection | Loads the section using PSD- or PSB-sized outer and layer-info lengths. |
save(writer: BigEndianWriter, isLargeDocument: boolean) | Writes the section while preserving raw bytes for no-mutation saves. |
withLayers(layers: Layer[]) → LayerAndMaskSection | Creates a section copy with a replaced layer collection and marks it for rewriting on save. |
equals(o: Object) → boolean | Calls equals(o) on this LayerAndMaskSection instance. |
hashCode() → int | Calls hashCode on this LayerAndMaskSection instance. |
toString() → String | Calls toString on this LayerAndMaskSection instance. |