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

PerChannelBitmapTransform.ApplyMaskTransform Method (Bitmap, Bitmap)

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

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

Syntax

Visual Basic
Public Overrides Sub ApplyMaskTransform ( _
	bitmap As Bitmap, _
	mask As Bitmap _
)
C#
public override void ApplyMaskTransform(
	Bitmap bitmap,
	Bitmap mask
)

Parameters

bitmap

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").
mask

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.

Remarks

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

Reference