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

MaskedBitmapTransform Class

This is a base class for all transforms which can be applied with mask.

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


Visual Basic
Public Class MaskedBitmapTransform _
	Inherits BitmapTransform
public class MaskedBitmapTransform : BitmapTransform


Transforms inherited from this class guaranties that they do not modify neither pixel format of the bitmap, nor its dimensions. It means that these transforms can be applied directly in-place (without creating bitmap copy). It has additional overloaded ApplyTransform(BitmapData) method which works in this way. It makes this transform running faster and consuming less memory, however if user will abort the transform, the effect will be partially applied (e.g. if user stops the contrast enhancement, half of image will have modified contrast, the rest part of image will be unchanged). So if you use it in this way, you should keep this fact in mind.

Another interesting feature of this class descendants is possibility to apply the effect with specified mask. Mask is a grayscale image of the same size as target bitmap which defines "region of interest" (ROI) in raster form. Black pixels on this mask are treated as transparent and effect is applied for appropriate pixels on target bitmap. White pixels are opaque and original pixels are copied to the target bitmap. Mask can be compared with a following sequense of actions:

  1. Effect is applied on copy of the original image.
  2. Mask bitmap replaces alpha channel in modified image.
  3. This image is alpha-blended with original image.

To apply transform with mask, you should use ApplyMaskTransform(Bitmap, Bitmap) method.

Inheritance Hierarchy

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also