EmptyImageMask Class
Summary: Describes an empty non-abstract mask.
Module: aspose.imaging.magicwand.imagemasks
Full Name: aspose.imaging.magicwand.imagemasks.EmptyImageMask
Inheritance: IImageMask, ImageMask
Constructors
Name | Description |
---|---|
EmptyImageMask(width, height) | Initializes a new instance of the EmptyImageMask class with the specified width and height. |
Properties
Name | Type | Access | Description |
---|---|---|---|
bounds | Rectangle | r | Gets the bounds, in pixels, of this mask. |
height | int | r | Gets the height, in pixels, of this mask. |
selection_bounds | Rectangle | r | Gets the bounds of the selected part of the mask, in pixels. |
source | RasterImage | r | Gets the source image used to create this mask, if exists. |
width | int | r | Gets the width, in pixels, of this mask. |
Methods
Name | Description |
---|---|
apply() | Applies current mask to the RasterImage source, if exists. |
apply_to(image) | Applies current mask to the specified RasterImage. |
clone() | Creates a new object that is a copy of the current instance. |
crop(rectangle) | Crops mask with the specified rectangle. |
crop(size) | Crops mask with the specified size. |
crop(width, height) | Crops mask with the specified width and height. |
exclusive_disjunction(image, settings) | Gets the exclusive disjunction of the current mask with the result of magic wand selection applied to the provided image. |
exclusive_disjunction(mask) | Gets the exclusive disjunction of current mask with provided. |
exclusive_disjunction(settings) | Gets the exclusive disjunction of the current mask with the result of magic wand selection applied to the source of the mask. |
get(x, y) | Gets the opacity of the specified pixel. |
get_byte_opacity(x, y) | Gets the opacity of the specified pixel with byte precision. |
get_feathered(settings) | Gets grayscale mask with the border feathered with the specified settings. |
inflate(size) | Inflates this mask by the specified amount. |
intersect(image, settings) | Gets the intersection of the current mask with the result of magic wand selection applied to the provided image. |
intersect(mask) | Gets the intersection of current mask with provided. |
intersect(settings) | Gets the intersection of the current mask with the result of magic wand selection applied to the source of the mask. |
invert() | Gets the inversion of the current mask. |
is_opaque(x, y) | Checks if the specified pixel is opaque. |
is_transparent(x, y) | Checks if the specified pixel is transparent. |
subtract(image, settings) | Gets the result of magic wand selection applied to the provided image subtracted from the current mask. |
subtract(mask) | Gets the subtraction of the provided mask from current. |
subtract(settings) | Gets the result of magic wand selection applied to the source of the current mask subtracted from the mask. |
union(image, settings) | Gets the union of the current mask with the result of magic wand selection applied to the provided image. |
union(mask) | Gets the union of the current mask with provided. |
union(settings) | Gets the union of the current mask with the result of magic wand selection applied to the source of the mask. |
Constructor: EmptyImageMask(width, height)
EmptyImageMask(width, height)
Initializes a new instance of the EmptyImageMask class with the specified width and height.
Parameters:
Parameter | Type | Description |
---|---|---|
width | int | Width of the mask. |
height | int | Height of the mask. |
Method: apply_to(image)
apply_to(image)
Applies current mask to the specified RasterImage.
Parameters:
Parameter | Type | Description |
---|---|---|
image | RasterImage | Image to apply mask to. |
Method: clone()
clone()
Creates a new object that is a copy of the current instance.
Returns
Type | Description |
---|---|
object | A new object that is a copy of this instance. |
Method: crop(rectangle)
crop(rectangle)
Crops mask with the specified rectangle.
Parameters:
Parameter | Type | Description |
---|---|---|
rectangle | Rectangle | The specified rectangle. |
Returns
Type | Description |
---|---|
ImageMask | A cropped EmptyImageMask as ImageMask. |
Method: crop(size)
crop(size)
Crops mask with the specified size.
Parameters:
Parameter | Type | Description |
---|---|---|
size | Size | The specified size. |
Returns
Type | Description |
---|---|
ImageMask | An ImageMask. |
Method: crop(width, height)
crop(width, height)
Crops mask with the specified width and height.
Parameters:
Parameter | Type | Description |
---|---|---|
width | int | The specified width. |
height | int | The specified height. |
Returns
Type | Description |
---|---|
ImageMask | An ImageMask. |
Method: exclusive_disjunction(image, settings)
exclusive_disjunction(image, settings)
Gets the exclusive disjunction of the current mask with the result of magic wand selection applied to the provided image.
Parameters:
Parameter | Type | Description |
---|---|---|
image | RasterImage | Image for magic wand. |
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: exclusive_disjunction(mask)
exclusive_disjunction(mask)
Gets the exclusive disjunction of current mask with provided.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | ImageMask | Provided mask |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: exclusive_disjunction(settings)
exclusive_disjunction(settings)
Gets the exclusive disjunction of the current mask with the result of magic wand selection applied to the source of the mask.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: get(x, y)
get(x, y)
Gets the opacity of the specified pixel.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate of the pixel. |
y | int | The y-coordinate of the pixel. |
Returns
Type | Description |
---|---|
bool | true if the specified pixel is opaque; otherwise, false. |
Method: get_byte_opacity(x, y)
get_byte_opacity(x, y)
Gets the opacity of the specified pixel with byte precision.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate of the pixel. |
y | int | The y-coordinate of the pixel. |
Returns
Type | Description |
---|---|
byte | Byte value, representing the opacity of the specified pixel. |
Method: get_feathered(settings)
get_feathered(settings)
Gets grayscale mask with the border feathered with the specified settings.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | FeatheringSettings | Feathering settings. |
Returns
Type | Description |
---|---|
ImageGrayscaleMask | ImageGrayscaleMask with feathered border. |
Method: inflate(size)
inflate(size)
Inflates this mask by the specified amount.
Parameters:
Parameter | Type | Description |
---|---|---|
size | int | The amount to inflate this mask. |
Returns
Type | Description |
---|---|
ImageMask | An inflated EmptyImageMask as ImageMask. |
Method: intersect(image, settings)
intersect(image, settings)
Gets the intersection of the current mask with the result of magic wand selection applied to the provided image.
Parameters:
Parameter | Type | Description |
---|---|---|
image | RasterImage | Image for magic wand. |
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: intersect(mask)
intersect(mask)
Gets the intersection of current mask with provided.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | ImageMask | Provided mask |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: intersect(settings)
intersect(settings)
Gets the intersection of the current mask with the result of magic wand selection applied to the source of the mask.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: invert()
invert()
Gets the inversion of the current mask.
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: is_opaque(x, y)
is_opaque(x, y)
Checks if the specified pixel is opaque.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate of the pixel. |
y | int | The y-coordinate of the pixel. |
Returns
Type | Description |
---|---|
bool | true if the specified pixel is opaque; otherwise, false. |
Method: is_transparent(x, y)
is_transparent(x, y)
Checks if the specified pixel is transparent.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate of the pixel. |
y | int | The y-coordinate of the pixel. |
Returns
Type | Description |
---|---|
bool | true if the specified pixel is transparent; otherwise, false. |
Method: subtract(image, settings)
subtract(image, settings)
Gets the result of magic wand selection applied to the provided image subtracted from the current mask.
Parameters:
Parameter | Type | Description |
---|---|---|
image | RasterImage | Image for magic wand. |
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: subtract(mask)
subtract(mask)
Gets the subtraction of the provided mask from current.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | ImageMask | Provided mask |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: subtract(settings)
subtract(settings)
Gets the result of magic wand selection applied to the source of the current mask subtracted from the mask.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: union(image, settings)
union(image, settings)
Gets the union of the current mask with the result of magic wand selection applied to the provided image.
Parameters:
Parameter | Type | Description |
---|---|---|
image | RasterImage | Image for magic wand. |
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: union(mask)
union(mask)
Gets the union of the current mask with provided.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | ImageMask | Provided mask |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |
Method: union(settings)
union(settings)
Gets the union of the current mask with the result of magic wand selection applied to the source of the mask.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | MagicWandSettings | Magic wand settings. |
Returns
Type | Description |
---|---|
ImageBitMask | New ImageBitMask. |