Table of Contents

Class ImageMasking

Namespace
Aspose.Imaging.Masking
Assembly
Aspose.Imaging.dll

Provides image masking operations

public class ImageMasking
Inheritance
ImageMasking
Inherited Members

Constructors

ImageMasking(RasterImage)

Initializes a new instance of the ImageMasking class.

public ImageMasking(RasterImage sourceImage)

Parameters

sourceImage RasterImage

The source image.

Exceptions

ArgumentNullException

source image is null.

Methods

ApplyMask(RasterImage, RasterImage, MaskingOptions)

Applies the mask to specified source image.

public static void ApplyMask(RasterImage targetImage, RasterImage mask, MaskingOptions maskingOptions)

Parameters

targetImage RasterImage

The target image.

mask RasterImage

The mask image to apply.

maskingOptions MaskingOptions

The masking options.

CreateSession(MaskingOptions)

Creates the masking session which can perform retraining decompose operations.

public IMaskingSession CreateSession(MaskingOptions options)

Parameters

options MaskingOptions

The options.

Returns

IMaskingSession

the masking session which can perform retraining decompose operations.

Decompose(MaskingOptions)

Performs the decompose operation using specified masking options

public MaskingResult Decompose(MaskingOptions options)

Parameters

options MaskingOptions

The masking options.

Returns

MaskingResult

Result of masking operation as array of segment image providers.

DecomposeAsync(MaskingOptions)

Creates the asynchronous decompose task using specified masking options.

public IMaskingAsyncTask DecomposeAsync(MaskingOptions options)

Parameters

options MaskingOptions

The masking options.

Returns

IMaskingAsyncTask

The asynchronous decompose task

LoadSession(Stream)

Load the session from the specified stream.

public IMaskingSession LoadSession(Stream stream)

Parameters

stream Stream

The stream.

Returns

IMaskingSession

the masking session which can perform retraining decompose operations.

LoadSession(string)

Load the session from the specified file.

public IMaskingSession LoadSession(string filePath)

Parameters

filePath string

The file path.

Returns

IMaskingSession

the masking session which can perform retraining decompose operations.