Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 188.8.131.52 (184.108.40.206)
public sealed class Subtract : BaseInPlaceFilter2
The subtract filter takes two images (source and overlay images) of the same size and pixel format and produces an image, where each pixel equals to the difference value of corresponding pixels from provided images (if difference is less than minimum allowed value, 0, then it is truncated to that minimum value).
The filter accepts 8 and 16 bpp grayscale images and 24, 32, 48 and 64 bpp color images for processing.
// create filter Subtract filter = new Subtract( overlayImage ); // apply the filter Bitmap resultImage = filter.Apply( sourceImage );