A constructor that constructs a mask from a RawBitmap ,taking in boolean value to decide if the mask should be inverted or not.
Note that if color mask is passed to this constructor then the Red channel is chosen as mask.
The RawBitmap passed in will not be copied. So if you update your RawBitmap after passing it in then you are also updating the mask.
Masks can also be inverted at zero CPU cost, this is done by not actually changing the mask just letting it respond differently to the image processing class that is using it.