IImageMask Class

Summary: Describes a mask.

Module: aspose.imaging.magicwand.imagemasks

Full Name: aspose.imaging.magicwand.imagemasks.IImageMask

Aspose.Imaging Version: 24.7.0

Properties

NameTypeAccessDescription
boundsRectanglerGets the bounds, in pixels, of this mask.
heightintrGets the height, in pixels, of this mask.
selection_boundsRectanglerGets the bounds of the selected part of the mask, in pixels.
sourceRasterImagerGets the source image used to create this mask, if exists.
widthintrGets the width, in pixels, of this mask.

Methods

NameDescription
get_byte_opacity(x, y)Gets the opacity of the specified pixel with byte precision.
is_opaque(x, y)Checks if the specified pixel is opaque.
is_transparent(x, y)Checks if the specified pixel is transparent.

Method: get_byte_opacity(x, y)

 get_byte_opacity(x, y) 

Gets the opacity of the specified pixel with byte precision.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the pixel.
yintThe y-coordinate of the pixel.

Returns

TypeDescription
byteByte value, representing the opacity of the specified pixel.

Method: is_opaque(x, y)

 is_opaque(x, y) 

Checks if the specified pixel is opaque.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the pixel.
yintThe y-coordinate of the pixel.

Returns

TypeDescription
booltrue 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:

ParameterTypeDescription
xintThe x-coordinate of the pixel.
yintThe y-coordinate of the pixel.

Returns

TypeDescription
booltrue if the specified pixel is transparent; otherwise, false.