/// <summary> /// Apply filter to an image in unmanaged memory. /// </summary> /// /// <param name="image">Source image in unmanaged memory to apply filter to.</param> /// /// <returns>Returns filter's result obtained by applying the filter to /// the source image.</returns> /// /// <remarks>The method keeps the source image unchanged and returns /// the result of image processing filter as new image.</remarks> /// /// <exception cref="UnsupportedImageFormatException">Unsupported pixel format of the source image.</exception> /// public UnmanagedImage Apply(UnmanagedImage image) { UnmanagedImage destImage = errosion.Apply(image); dilation.ApplyInPlace(destImage); return(destImage); }
/// <summary> /// Apply filter to an image. /// </summary> /// /// <param name="image">Image to apply filter to.</param> /// /// <remarks>The method applies the filter directly to the provided source image.</remarks> /// /// <exception cref="UnsupportedImageFormatException">Unsupported pixel format of the source image.</exception> /// public void ApplyInPlace(Bitmap image) { dilation.ApplyInPlace(image); errosion.ApplyInPlace(image); }