Mask
Applies the given image mask to the current image. Any area containing transparency withing the mask will be removed from the original image. If the mask is larger than the image it will be resized to match the images dimensions.
Added in version 2.1.0
public ImageFactory Mask(ImageLayer imageLayer)
Parameters
- imageLayer
-
The
ImageLayercontaining theImageandNullable<System.Drawing.Point>properties necessary to mask the image.
The point property is used to place the image mask if it not the same dimensions as the original image. If no position is set, the mask will be centered within the image.
The below has been removed from the library in version 2.5.1 due to a memory leak.
public ImageFactory Mask(Image imageMask, Point? point = null)
Parameters
- imageMask
- The image containing the mask to apply.
- point
-
The
Nullable<System.Drawing.Point>to place the mask if it not the same dimensions as the original image. If no position is set, the mask will be centered within the image.
Examples
Original
Masked