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

NameTypeAccessDescription
rawSectionBytesbyte[]ReadGets the raw section payload without the outer length field.
layerChannelImageDataRawbyte[]ReadGets the raw layer channel image data payload after layer records.
layerGlobalMaskAndTailRawbyte[]ReadGets the raw global mask info and trailing section bytes.
layerCountRawshortReadGets the original signed layer count so transparency-protected layers can preserve sign.
layersLayer[]ReadGets the parsed layer records.
hasLayerCollectionMutatedbooleanReadGets a value indicating whether the public layer collection was replaced.
EMPTYLayerAndMaskSectionReadAn empty Layer and Mask Information section.

Methods

SignatureDescription
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() → shortGets the original signed layer count so transparency-protected layers can preserve sign.
getLayers() → Layer[]Gets the parsed layer records.
isHasLayerCollectionMutated() → booleanGets a value indicating whether the public layer collection was replaced.
load(reader: BigEndianReader, isLargeDocument: boolean) → LayerAndMaskSectionLoads 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[]) → LayerAndMaskSectionCreates a section copy with a replaced layer collection and marks it for rewriting on save.
equals(o: Object) → booleanCalls equals(o) on this LayerAndMaskSection instance.
hashCode() → intCalls hashCode on this LayerAndMaskSection instance.
toString() → StringCalls toString on this LayerAndMaskSection instance.

See Also