LayerMaskData Class
Summary: Defines base LayerMaskData class which contains information about the layer mask data in the PSD file.
It can help to modify Adobe® Photoshop® files programmatically and automate PSD format editing.
If the layer has only a raster mask the ImageData contains the raster mask data bytes.
If the layer has only a vector mask the ImageData contains the vector mask rasterized (cached) data bytes.
If the layer has both layer and vector masks the ImageData contains the raster mask and the rasterized vector mask combined.
The LayerMaskData.image_data bytes length should be equal Width * Height of LayerMaskData.mask_rectangle properties.
Notice, that just removing / adding / updating the LayerMaskData is not enough for correct saving
because channels are not updated; though it may provide correct rendering.
The Layer.add_layer_mask(layer_mask) method should be used for that.
Module: aspose.psd.fileformats.psd.layers
Full Name: aspose.psd.fileformats.psd.layers.LayerMaskData
Aspose.PSD Version: 24.9.0
Properties
Name | Type | Access | Description |
---|---|---|---|
bottom | int | r/w | Gets or sets the bottom layer mask position. |
data_size | int | r | Gets the size of the layer mask mask data. |
default_color | byte | r/w | Gets or sets the default color. |
flags | LayerMaskFlags | r/w | Gets or sets the layer mask flags. |
image_data | byte | r/w | Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file. |
left | int | r/w | Gets or sets the left layer mask position. |
mask_rectangle | Rectangle | r/w | Gets or sets the mask Rectangle of the layer mask in the PSD file. It takes left, right, top and bottom properties and creates Rectangle |
right | int | r/w | Gets or sets the right layer mask position. |
top | int | r/w | Gets or sets the top layer mask position. |