Layer

Overview

Layer is a class in Aspose.PSD FOSS for Java.

Represents a single PSD layer with basic metadata used by the FOSS library.

This class declares 35 methods for Layer objects in Java programs. Available methods include: getAdditionalLayerData, getBlendModeKey, getBlendingRangesInfo, getBottom, getBounds, getChannelInformation, getChannels, getChannelsCount, getClipping, getHeight, getLayerBlendingRangesData, getLayerMaskData, and 23 additional methods. Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package. Properties: LAYER_TRAILER_SIZE, additionalLayerData, blendModeKey, blendingRangesInfo, bottom, bounds, and 16 more.

Properties

NameTypeAccessDescription
nameStringRead/WriteGets or sets the Pascal layer name stored in the layer record.
boundsRectangleReadGets the Aspose.PSD-compatible local layer rectangle.
widthintReadGets the layer width in pixels.
heightintReadGets the layer height in pixels.
topintRead/WriteGets the top edge of the layer bounds.
leftintRead/WriteGets the left edge of the layer bounds.
bottomintRead/WriteGets the bottom edge of the layer bounds.
rightintRead/WriteGets the right edge of the layer bounds.
visiblebooleanRead/WriteGets or sets a value indicating whether the layer is visible.
opacitybyteRead/WriteGets or sets the layer opacity in the 0-255 range.
clippingbyteRead/WriteGets the PSD clipping value for the layer.
blendModeKeyBlendModeRead/WriteGets or sets the layer blend mode key.
channelsCountintReadGets the layer’s channels count.
channelInformationChannelInformation[]ReadGets the channel information of the layer.
channelsList<PsdLayerChannelInfo>ReadGets a read-only summary of the parsed layer channel records.
maskInfoLayerMaskInfoReadGets a read-only summary of the parsed layer mask subsection.
blendingRangesInfoLayerBlendingRangesInfoReadGets a read-only summary of the parsed blending ranges subsection.
layerMaskDataLayerMaskDataReadGets the layer mask data of the layer.
layerBlendingRangesDataLayerBlendingRangesDataReadGets the layer blending ranges data of the layer.
additionalLayerDatabyte[]ReadGets the additional layer data bytes that follow the Pascal layer name.
rawBlendModeKeyStringReadGets the original raw 4-byte PSD blend mode key for diagnostics and raw-preserve verification.
LAYER_TRAILER_SIZEintReadThe fixed-size byte count of the layer record trailer fields.

Methods

SignatureDescription
getName() → StringGets or sets the Pascal layer name stored in the layer record.
setName(value: String)Sets the name value.
getBounds() → RectangleGets the Aspose.PSD-compatible local layer rectangle.
getWidth() → intGets the layer width in pixels.
getHeight() → intGets the layer height in pixels.
getTop() → intGets the top edge of the layer bounds.
setTop(value: int)Sets the top value.
getLeft() → intGets the left edge of the layer bounds.
setLeft(value: int)Sets the left value.
getBottom() → intGets the bottom edge of the layer bounds.
setBottom(value: int)Sets the bottom value.
getRight() → intGets the right edge of the layer bounds.
setRight(value: int)Sets the right value.
isVisible() → booleanGets or sets a value indicating whether the layer is visible.
setVisible(value: boolean)Sets the visible value.
getOpacity() → byteGets or sets the layer opacity in the 0-255 range.
setOpacity(value: byte)Sets the opacity value.
getClipping() → byteGets the PSD clipping value for the layer.
setClipping(value: byte)Sets the clipping value.
getBlendModeKey() → BlendModeGets or sets the layer blend mode key.
setBlendModeKey(value: BlendMode)Sets the blend mode key value.
getChannelsCount() → intGets the layer’s channels count.
getChannelInformation() → ChannelInformation[]Gets the channel information of the layer.
setChannelInformation(value: ChannelInformation[])Not implemented in the FOSS edition — throws at runtime. Sets the channel information value.
getChannels() → List<PsdLayerChannelInfo>Gets a read-only summary of the parsed layer channel records.
getMaskInfo() → LayerMaskInfoGets a read-only summary of the parsed layer mask subsection.
getBlendingRangesInfo() → LayerBlendingRangesInfoGets a read-only summary of the parsed blending ranges subsection.
getLayerMaskData() → LayerMaskDataGets the layer mask data of the layer.
setLayerMaskData(value: LayerMaskData)Not implemented in the FOSS edition — throws at runtime. Sets the layer mask data value.
getLayerBlendingRangesData() → LayerBlendingRangesDataGets the layer blending ranges data of the layer.
setLayerBlendingRangesData(value: LayerBlendingRangesData)Not implemented in the FOSS edition — throws at runtime. Sets the layer blending ranges data value.
getAdditionalLayerData() → byte[]Gets the additional layer data bytes that follow the Pascal layer name.
getRawBlendModeKey() → StringGets the original raw 4-byte PSD blend mode key for diagnostics and raw-preserve verification.
hasMutated() → booleanGets a value indicating whether the layer has a pending in-memory mutation.
load(reader: BigEndianReader, isLargeDocument: boolean) → LayerLoads a layer record from the current reader position.

See Also