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
| Name | Type | Access | Description |
|---|---|---|---|
name | String | Read/Write | Gets or sets the Pascal layer name stored in the layer record. |
bounds | Rectangle | Read | Gets the Aspose.PSD-compatible local layer rectangle. |
width | int | Read | Gets the layer width in pixels. |
height | int | Read | Gets the layer height in pixels. |
top | int | Read/Write | Gets the top edge of the layer bounds. |
left | int | Read/Write | Gets the left edge of the layer bounds. |
bottom | int | Read/Write | Gets the bottom edge of the layer bounds. |
right | int | Read/Write | Gets the right edge of the layer bounds. |
visible | boolean | Read/Write | Gets or sets a value indicating whether the layer is visible. |
opacity | byte | Read/Write | Gets or sets the layer opacity in the 0-255 range. |
clipping | byte | Read/Write | Gets the PSD clipping value for the layer. |
blendModeKey | BlendMode | Read/Write | Gets or sets the layer blend mode key. |
channelsCount | int | Read | Gets the layer’s channels count. |
channelInformation | ChannelInformation[] | Read | Gets the channel information of the layer. |
channels | List<PsdLayerChannelInfo> | Read | Gets a read-only summary of the parsed layer channel records. |
maskInfo | LayerMaskInfo | Read | Gets a read-only summary of the parsed layer mask subsection. |
blendingRangesInfo | LayerBlendingRangesInfo | Read | Gets a read-only summary of the parsed blending ranges subsection. |
layerMaskData | LayerMaskData | Read | Gets the layer mask data of the layer. |
layerBlendingRangesData | LayerBlendingRangesData | Read | Gets the layer blending ranges data of the layer. |
additionalLayerData | byte[] | Read | Gets the additional layer data bytes that follow the Pascal layer name. |
rawBlendModeKey | String | Read | Gets the original raw 4-byte PSD blend mode key for diagnostics and raw-preserve verification. |
LAYER_TRAILER_SIZE | int | Read | The fixed-size byte count of the layer record trailer fields. |
Methods
| Signature | Description |
|---|---|
getName() → String | Gets or sets the Pascal layer name stored in the layer record. |
setName(value: String) | Sets the name value. |
getBounds() → Rectangle | Gets the Aspose.PSD-compatible local layer rectangle. |
getWidth() → int | Gets the layer width in pixels. |
getHeight() → int | Gets the layer height in pixels. |
getTop() → int | Gets the top edge of the layer bounds. |
setTop(value: int) | Sets the top value. |
getLeft() → int | Gets the left edge of the layer bounds. |
setLeft(value: int) | Sets the left value. |
getBottom() → int | Gets the bottom edge of the layer bounds. |
setBottom(value: int) | Sets the bottom value. |
getRight() → int | Gets the right edge of the layer bounds. |
setRight(value: int) | Sets the right value. |
isVisible() → boolean | Gets or sets a value indicating whether the layer is visible. |
setVisible(value: boolean) | Sets the visible value. |
getOpacity() → byte | Gets or sets the layer opacity in the 0-255 range. |
setOpacity(value: byte) | Sets the opacity value. |
getClipping() → byte | Gets the PSD clipping value for the layer. |
setClipping(value: byte) | Sets the clipping value. |
getBlendModeKey() → BlendMode | Gets or sets the layer blend mode key. |
setBlendModeKey(value: BlendMode) | Sets the blend mode key value. |
getChannelsCount() → int | Gets 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() → LayerMaskInfo | Gets a read-only summary of the parsed layer mask subsection. |
getBlendingRangesInfo() → LayerBlendingRangesInfo | Gets a read-only summary of the parsed blending ranges subsection. |
getLayerMaskData() → LayerMaskData | Gets 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() → LayerBlendingRangesData | Gets 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() → String | Gets the original raw 4-byte PSD blend mode key for diagnostics and raw-preserve verification. |
hasMutated() → boolean | Gets a value indicating whether the layer has a pending in-memory mutation. |
load(reader: BigEndianReader, isLargeDocument: boolean) → Layer | Loads a layer record from the current reader position. |