BitmapExtensionMethods.BitmapProcess

ParallelProcess<2>AbstractProcessReferences
Multi-threaded bitmap processor base class. This class adds region clipping and control layers to the ParallelProcess class.

Constructors

BitmapProcess

#
protected BitmapProcess(BitmapData data, int x0, int x1, int y0, int y1)
Set up a process for a specific region of an image.
data (BitmapData)Bitmap data.
x0 (int)Inclusive leftmost pixel index to be processed.
x1 (int)Exclusive rightmost pixel index to be processed.
y0 (int)Inclusive topmost pixel index to be processed.
y1 (int)Exclusive bottommost pixel index to be processed.

BitmapProcess

#
protected BitmapProcess(BitmapData data)
Set up a process for the entire image.
data (BitmapData)Bitmap data.

Fields

_data

#
protected readonly BitmapData _data
Bitmap data.

_x0

#
protected readonly int _x0
Inclusive leftmost pixel index to be processed.

_x1

#
protected readonly int _x1
Exclusive rightmost pixel index to be processed.

_y0

#
protected readonly int _y0
Inclusive topmost pixel index to be processed.

_y1

#
protected readonly int _y1
Exclusive bottommost pixel index to be processed.

Properties

CountOverride

public int CountOverride { get; set; }
Gets or sets the number of iterations to process. If the override is negative, the size of the longest input array determines the count.
inherited fromAbstractProcess

RunSingleThreaded

public bool RunSingleThreaded { get; }
Gets whether this process is supposed to run in single threaded mode.
inherited fromAbstractProcess

ThreadCount

public int ThreadCount { get; set; }
Gets or sets the maximum degrees of parallelism for this process. Leave the value at a negative number to revert to default.
inherited fromAbstractProcess

Methods

CreateOptions

protected ParallelOptions CreateOptions(CancellationToken token)
inherited fromAbstractProcess
token (CancellationToken)

Perform

public TResult[] Perform(T1[] data1, CancellationToken token)
inherited fromParallelProcess<TResult, T1>
data1 (T1[])
token (CancellationToken)

Perform

public TResult[] Perform(T1[] data1)
inherited fromParallelProcess<TResult, T1>
data1 (T1[])

Perform

#
public void Perform()
Perform this process on all columns in the bitmap.

Process

protected abstract TResult Process(T1 data, CancellationToken token)
inherited fromParallelProcess<TResult, T1>
data (T1)
token (CancellationToken)