Class ImageBitMask
Namespace: Aspose.Imaging.MagicWand.ImageMasks
Assembly: Aspose.Imaging.dll (25.2.0)
Describes a binary image mask.
public class ImageBitMask : ImageMask, IImageMask, ICloneable
Inheritance
object ← ImageMask ← ImageBitMask
Implements
Inherited Members
ImageMask.Inflate(int), ImageMask.Crop(Size), ImageMask.Crop(int, int), ImageMask.Crop(Rectangle), ImageMask.IsOpaque(int, int), ImageMask.IsTransparent(int, int), ImageMask.GetByteOpacity(int, int), ImageMask.Clone(), ImageMask.GetFeathered(FeatheringSettings), ImageMask.Apply(), ImageMask.ApplyTo(RasterImage), ImageMask.Invert(), ImageMask.Union(ImageMask), ImageMask.Union(MagicWandSettings), ImageMask.Union(RasterImage, MagicWandSettings), ImageMask.Subtract(ImageMask), ImageMask.Subtract(MagicWandSettings), ImageMask.Subtract(RasterImage, MagicWandSettings), ImageMask.Intersect(ImageMask), ImageMask.Intersect(MagicWandSettings), ImageMask.Intersect(RasterImage, MagicWandSettings), ImageMask.ExclusiveDisjunction(ImageMask), ImageMask.ExclusiveDisjunction(MagicWandSettings), ImageMask.ExclusiveDisjunction(RasterImage, MagicWandSettings), ImageMask.Source, ImageMask.Width, ImageMask.Height, ImageMask.Bounds, ImageMask.SelectionBounds, ImageMask.this[int, int], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ImageBitMask(int, int)
Initializes a new instance of the Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask class with the specified width and height.
public ImageBitMask(int width, int height)
Parameters
width
int
Width of the mask.
height
int
Height of the mask.
ImageBitMask(RasterImage)
Initializes a new instance of the Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask class with the size of the specified existing Aspose.Imaging.RasterImage. Specified Aspose.Imaging.RasterImage will be stored as source image.
public ImageBitMask(RasterImage image)
Parameters
image
RasterImage
Source image.
Properties
SelectionBounds
Gets the bounds of the selected part of the mask, in pixels.
public override Rectangle SelectionBounds { get; }
Property Value
this[int, int]
Gets the opacity of the specified pixel.
public override bool this[int x, int y] { get; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override object Clone()
Returns
A new object that is a copy of this instance.
Crop(Rectangle)
Crops mask with the specified rectangle.
public override ImageMask Crop(Rectangle rectangle)
Parameters
rectangle
Rectangle
The specified rectangle.
Returns
A cropped Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask as Aspose.Imaging.MagicWand.ImageMasks.ImageMask.
Inflate(int)
Inflates this mask by the specified amount.
public override ImageMask Inflate(int size)
Parameters
size
int
The amount to inflate this mask.
Returns
An inflated Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask as Aspose.Imaging.MagicWand.ImageMasks.ImageMask.
SetMaskPixel(int, int, bool)
Sets the opacity to the specified pixel.
public void SetMaskPixel(int x, int y, bool value)
Parameters
x
int
The x-coordinate of the pixel.
y
int
The y-coordinate of the pixel.
value
bool
true if the specified pixel is opaque; otherwise, false.
Operators
operator +(ImageBitMask, ImageBitMask)
Union of two masks.
public static ImageBitMask operator +(ImageBitMask a, ImageBitMask b)
Parameters
The first mask.
The second mask.
Returns
New Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask.
operator ^(ImageBitMask, ImageBitMask)
Exclusive disjunction of two masks.
public static ImageBitMask operator ^(ImageBitMask a, ImageBitMask b)
Parameters
The first mask.
The second mask.
Returns
New Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask.
operator !(ImageBitMask)
Inverts mask.
public static ImageBitMask operator !(ImageBitMask a)
Parameters
The mask to be inverted.
Returns
New Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask.
operator *(ImageBitMask, ImageBitMask)
Intersection of two masks.
public static ImageBitMask operator *(ImageBitMask a, ImageBitMask b)
Parameters
The first mask.
The second mask.
Returns
New Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask.
operator -(ImageBitMask, ImageBitMask)
Subtract second mask from first.
public static ImageBitMask operator -(ImageBitMask a, ImageBitMask b)
Parameters
The first mask.
The second mask.
Returns
New Aspose.Imaging.MagicWand.ImageMasks.ImageBitMask.