Function BitMap.createFromImageAlpha

Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to threshold or less, and true in other case.

void createFromImageAlpha (
  Image image,
  const(double) threshold = 0.1
) nothrow @nogc;