Create a layer mask for the specified layer.
This procedure creates a layer mask for the specified layer. Layer masks serve as an additional alpha channel for a layer. Different types of masks are allowed for initialisation:
The layer mask still needs to be added to the layer. This can be done with a call to add_mask.
create_mask will fail if there are no active channels on the image, when called with 'ADD-CHANNEL-MASK'. It will return a black mask when called with 'ADD-ALPHA-MASK' or 'ADD-ALPHA-TRANSFER-MASK' on a layer with no alpha channels, or with 'ADD-SELECTION-MASK' when there is no selection on the image.
| this |
The layer to which to add the mask. |
| mask_type |
The type of mask. |
|
The newly created mask. |