Table of Contents

Property Mask

Namespace
BitMiracle.Docotic.Pdf
Assembly
BitMiracle.Docotic.Pdf.dll

Mask

Gets or sets the mask image for this PdfImage.

public PdfImage? Mask { get; set; }

Property Value

PdfImage

The mask image for this PdfImage.

Remarks

The returned value can be a stencil mask, or a soft mask, or null if there is no mask image associated with the image. If the IsMask property is true for the returned image then the mask is a stencil one. Otherwise, the mask is a soft mask.

This property can be used to set stencil or soft mask for the image. If the provided value is an image with its IsMask property equal to true then the value is treated as a stencil mask. Otherwise, the value is treated as a soft mask.

For any provided value, which is not a grayscale image (1 color channel, 8 bits per channel, gray color space) and not a stencil mask, the following is performed: the image gets converted to RGB, the R (red) component of the converted image is then used as a soft mask image.