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

PerChannelBitmapTransform.ApplyMaskTransform Method (BitmapData, Bitmap)

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

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

Syntax

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

Parameters

bitmapData

Type: Aurigma.GraphicsMill.BitmapData

BitmapData which should be transformed. Result of the transform will be saved to the same bitmap data (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