---
title: "ImageMask.Intersect"
url: "https://reference.aspose.com/imaging/net/aspose.imaging.magicwand.imagemasks/imagemask/intersect/"
product: "Aspose.Imaging for .NET API Reference"
description: "ImageMask method. Gets the intersection of current mask with provided"
---

## Intersect(ImageMask) {#intersect}

Gets the intersection of current mask with provided.

```csharp
public ImageBitMask Intersect(ImageMask mask)
```

| Parameter | Type | Description |
| --- | --- | --- |
| mask | ImageMask | Provided mask |

### Return Value

New [`ImageBitMask`](../../imagebitmask/).

### See Also

* class [ImageBitMask](../../imagebitmask/)
* class [ImageMask](../)
* namespace [Aspose.Imaging.MagicWand.ImageMasks](../../imagemask/)
* assembly [Aspose.Imaging](../../../)

---

## Intersect(MagicWandSettings) {#intersect_1}

Gets the intersection of the current mask with the result of magic wand selection applied to the source of the mask.

```csharp
public ImageBitMask Intersect(MagicWandSettings settings)
```

| Parameter | Type | Description |
| --- | --- | --- |
| settings | MagicWandSettings | Magic wand settings. |

### Return Value

New [`ImageBitMask`](../../imagebitmask/).

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentNullException | Thrown when the source image is not defined in mask. |

### See Also

* class [ImageBitMask](../../imagebitmask/)
* class [MagicWandSettings](../../../aspose.imaging.magicwand/magicwandsettings/)
* class [ImageMask](../)
* namespace [Aspose.Imaging.MagicWand.ImageMasks](../../imagemask/)
* assembly [Aspose.Imaging](../../../)

---

## Intersect(RasterImage, MagicWandSettings) {#intersect_2}

Gets the intersection of the current mask with the result of magic wand selection applied to the provided image.

```csharp
public ImageBitMask Intersect(RasterImage image, MagicWandSettings settings)
```

| Parameter | Type | Description |
| --- | --- | --- |
| image | RasterImage | Image for magic wand. |
| settings | MagicWandSettings | Magic wand settings. |

### Return Value

New [`ImageBitMask`](../../imagebitmask/).

### See Also

* class [ImageBitMask](../../imagebitmask/)
* class [RasterImage](../../../aspose.imaging/rasterimage/)
* class [MagicWandSettings](../../../aspose.imaging.magicwand/magicwandsettings/)
* class [ImageMask](../)
* namespace [Aspose.Imaging.MagicWand.ImageMasks](../../imagemask/)
* assembly [Aspose.Imaging](../../../)


