ImageBitMask 类
Summary: Describes a binary image mask.
Module: aspose.imaging.magicwand.imagemasks
Full Name: aspose.imaging.magicwand.imagemasks.ImageBitMask
Inheritance: IImageMask, ImageMask
Constructors
| Name | 描述 |
|---|---|
| ImageBitMask(image) | 使用指定的现有 RasterImage 的尺寸,初始化 ImageBitMask 类的新实例。 指定的 RasterImage 将被存储为源图像。 |
| ImageBitMask(width, height) | 使用指定的宽度和高度,初始化 ImageBitMask 类的新实例。 |
Properties
| Name | Type | Access | 描述 |
|---|---|---|---|
| bounds | Rectangle | r | 获取此掩码的边界(以像素为单位)。 |
| height | int | r | 获取此掩码的高度(以像素为单位)。 |
| selection_bounds | Rectangle | r | 获取掩码选定部分的边界(以像素为单位)。 |
| source | RasterImage | r | 获取用于创建此掩码的源图像(如果存在)。 |
| width | int | r | 获取此掩码的宽度(以像素为单位)。 |
Methods
| Name | 描述 |
|---|---|
| apply() | 如果存在,将当前掩码应用于 RasterImage 源。 |
| apply_to(image) | 将当前掩码应用于指定的 RasterImage。 |
| clone() | 创建一个新对象,该对象是当前实例的副本。 |
| crop(rectangle) | 使用指定的矩形裁剪掩码。 |
| crop(size) | 使用指定的尺寸裁剪掩码。 |
| crop(width, height) | 使用指定的宽度和高度裁剪掩码。 |
| exclusive_disjunction(image, settings) | 获取当前掩码与对提供的图像应用魔棒选择结果的异或。 |
| exclusive_disjunction(mask) | 获取当前掩码与提供的内容的异或。 |
| exclusive_disjunction(settings) | 获取当前掩码与对掩码源应用魔棒选择结果的异或。 |
| get(x, y) | 获取指定像素在存储数组中的位置。 |
| get_byte_opacity(x, y) | 获取指定像素的透明度(以字节精度)。 |
| get_feathered(settings) | 获取使用指定设置羽化边框的灰度遮罩。 |
| inflate(size) | 按指定量膨胀此遮罩。 |
| intersect(image, settings) | 获取当前遮罩与对提供的图像应用魔棒选择的结果的交集。 |
| intersect(mask) | 获取当前遮罩与提供的遮罩的交集。 |
| intersect(settings) | 获取当前遮罩与对遮罩源应用魔棒选择的结果的交集。 |
| invert() | 获取当前遮罩的反转。 |
| is_opaque(x, y) | 检查指定像素是否不透明。 |
| is_transparent(x, y) | 检查指定像素是否透明。 |
| set_mask_pixel(x, y, value) | 设置指定像素的不透明度。 |
| subtract(image, settings) | 获取将对提供的图像应用魔棒选择的结果从当前遮罩中减去后的结果。 |
| subtract(mask) | 获取当前遮罩减去提供的遮罩的结果。 |
| subtract(settings) | 获取将对当前遮罩源应用魔棒选择的结果从遮罩中减去后的结果。 |
| union(image, settings) | 获取当前遮罩与对提供的图像应用魔棒选择的结果的并集。 |
| union(mask) | 获取当前遮罩与提供的遮罩的并集。 |
| union(settings) | 获取当前遮罩与对遮罩源应用魔棒选择的结果的并集。 |
Constructor: ImageBitMask(image)
ImageBitMask(image)
使用指定的现有 RasterImage 的尺寸,初始化 ImageBitMask 类的新实例。
指定的 RasterImage 将被存储为源图像。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 源图像。 |
Constructor: ImageBitMask(width, height)
ImageBitMask(width, height)
使用指定的宽度和高度,初始化 ImageBitMask 类的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| width | int | 掩码的宽度。 |
| height | int | 掩码的高度。 |
Method: apply_to(image)
apply_to(image)
将当前掩码应用于指定的 RasterImage。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 用于应用遮罩的图像。 |
Method: clone()
clone()
创建一个新对象,该对象是当前实例的副本。
Returns
| Type | Description |
|---|---|
| System.Object | 此实例的副本的新对象。 |
Method: crop(rectangle)
crop(rectangle)
使用指定的矩形裁剪掩码。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| rectangle | Rectangle | 指定的矩形。 |
Returns
| Type | Description |
|---|---|
| ImageMask | 裁剪后的 ImageBitMask 作为 ImageMask。 |
Method: crop(size)
crop(size)
使用指定的尺寸裁剪掩码。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| size | Size | 指定的大小。 |
Returns
| Type | Description |
|---|---|
| ImageMask | 一个 ImageMask。 |
Method: crop(width, height)
crop(width, height)
使用指定的宽度和高度裁剪掩码。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| width | int | 指定的宽度。 |
| height | int | 指定的高度。 |
Returns
| Type | Description |
|---|---|
| ImageMask | 一个 ImageMask。 |
Method: exclusive_disjunction(image, settings)
exclusive_disjunction(image, settings)
获取当前掩码与对提供的图像应用魔棒选择结果的异或。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 魔棒使用的图像。 |
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: exclusive_disjunction(mask)
exclusive_disjunction(mask)
获取当前掩码与提供的内容的异或。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| mask | ImageMask | 提供的掩码 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: exclusive_disjunction(settings)
exclusive_disjunction(settings)
获取当前掩码与对掩码源应用魔棒选择结果的异或。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: get(x, y)
get(x, y)
获取指定像素在存储数组中的位置。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns
| Type | Description |
|---|---|
| bool | 整数值,表示在存储中的位置。 |
Method: get_byte_opacity(x, y)
get_byte_opacity(x, y)
获取指定像素的透明度(以字节精度)。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns
| Type | Description |
|---|---|
| System.Byte | 字节值,表示指定像素的透明度。 |
Method: get_feathered(settings)
get_feathered(settings)
获取使用指定设置羽化边框的灰度遮罩。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| settings | FeatheringSettings | 羽化设置。 |
Returns
| Type | Description |
|---|---|
| ImageGrayscaleMask | ImageGrayscaleMask 带羽化边框。 |
Method: inflate(size)
inflate(size)
按指定量膨胀此遮罩。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| size | int | 要膨胀此掩码的量。 |
Returns
| Type | Description |
|---|---|
| ImageMask | 膨胀的 ImageBitMask 作为 ImageMask。 |
Method: intersect(image, settings)
intersect(image, settings)
获取当前遮罩与对提供的图像应用魔棒选择的结果的交集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 魔棒使用的图像。 |
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: intersect(mask)
intersect(mask)
获取当前遮罩与提供的遮罩的交集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| mask | ImageMask | 提供的掩码 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: intersect(settings)
intersect(settings)
获取当前遮罩与对遮罩源应用魔棒选择的结果的交集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: invert()
invert()
获取当前遮罩的反转。
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: is_opaque(x, y)
is_opaque(x, y)
检查指定像素是否不透明。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns
| Type | Description |
|---|---|
| bool | 如果指定像素不透明则为 true;否则为 false。 |
Method: is_transparent(x, y)
is_transparent(x, y)
检查指定像素是否透明。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns
| Type | Description |
|---|---|
| bool | 如果指定像素透明则为 true;否则为 false。 |
Method: set_mask_pixel(x, y, value)
set_mask_pixel(x, y, value)
设置指定像素的不透明度。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
| value | bool | 如果指定像素不透明则为 true;否则为 false。 |
Method: subtract(image, settings)
subtract(image, settings)
获取将对提供的图像应用魔棒选择的结果从当前遮罩中减去后的结果。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 魔棒使用的图像。 |
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: subtract(mask)
subtract(mask)
获取当前遮罩减去提供的遮罩的结果。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| mask | ImageMask | 提供的掩码 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: subtract(settings)
subtract(settings)
获取将对当前遮罩源应用魔棒选择的结果从遮罩中减去后的结果。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: union(image, settings)
union(image, settings)
获取当前遮罩与对提供的图像应用魔棒选择的结果的并集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| image | RasterImage | 魔棒使用的图像。 |
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: union(mask)
union(mask)
获取当前遮罩与提供的遮罩的并集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| mask | ImageMask | 提供的掩码 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |
Method: union(settings)
union(settings)
获取当前遮罩与对遮罩源应用魔棒选择的结果的并集。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| settings | MagicWandSettings | 魔棒设置。 |
Returns
| Type | Description |
|---|---|
| ImageBitMask | 新建 ImageBitMask。 |