How i can add the BitmapMask in C#

I looking for the right command in c# to do this:

  • Select Black 100%
  • Tolerance 100%
  • Apply on the selected image.

previewImg.Bitmap.ConvertTo(corel.cdrImageType.cdrGrayscaleImage);