This documentation is for the old version. Go to the latest Graphics Mill docs

MaskedBitmapTransform.ApplyMaskTransform Method (Bitmap, Bitmap)

Transforms given bitmap "in-place" using specified mask.

Namespace: Aurigma.GraphicsMill.Transforms
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)


Visual Basic
Public Overridable Sub ApplyMaskTransform ( _
	bitmap As Bitmap, _
	mask As Bitmap _
public virtual void ApplyMaskTransform(
	Bitmap bitmap,
	Bitmap mask



Type: Aurigma.GraphicsMill.Bitmap

Bitmap which should be transformed. Result of the transform will be saved to the same bitmap (in other word, transform is applied "in-place").

Type: Aurigma.GraphicsMill.Bitmap

Bitmap which defines mask. Mask should be 8-bit grayscale bitmap (its pixel format is Format8bppGrayScale) of the same dimensions as original image.


You can create empty mask for the bitmap using GetEmptyMask() method. This method always returns mask with proper dimensions and pixel format. Initially this mask is fully transparent (filled with black pixels). You should draw necessary non-transparent areas yourself.

See Also