Class LayerMaskData

LayerMaskData class

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 ImageData bytes length should be equal Width * Height of MaskRectangle 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 AddLayerMask method should be used for that.

public abstract class LayerMaskData

Properties

NameDescription
Bottom { get; set; }Gets or sets the bottom layer mask position.
DataSize { get; }Gets the size of the layer mask mask data.
DefaultColor { get; set; }Gets or sets the default color.
Flags { get; set; }Gets or sets the layer mask flags.
ImageData { get; set; }Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file.
Left { get; set; }Gets or sets the left layer mask position.
MaskRectangle { get; set; }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 { get; set; }Gets or sets the right layer mask position.
Top { get; set; }Gets or sets the top layer mask position.

See Also