Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 220.127.116.11 (18.104.22.168)
public class ApplyMask : BaseInPlacePartialFilter
The filter applies mask to the specified image - keeps all pixels in the image if corresponding pixels/values of the mask are not equal to 0. For all 0 pixels/values in mask, corresponding pixels in the source image are set to 0.
Mask can be specified as .NET's managed Bitmap, as UnmanagedImage or as byte array. In the case if mask is specified as image, it must be 8 bpp grayscale image. In all case mask size must be the same as size of the image to process.
The filter accepts 8/16 bpp grayscale and 24/32/48/64 bpp color images for processing.