Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 188.8.131.52 (184.108.40.206)
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.