BitmapExtensionMethods.PaletteDeviationProcess

BitmapExtensionMethods.BitmapProcessParallelProcess<2>AbstractProcess
Parallel process for creating palette deviation images.

Constructors

PaletteDeviationProcess

#
public PaletteDeviationProcess(BitmapData data, SpatialTree<Color> palette, Gradient gradient)
Create a new process.
data (BitmapData)
palette (SpatialTree<Color>)
gradient (Gradient)

Fields

_data

protected readonly BitmapData _data
Bitmap data.
inherited fromBitmapExtensionMethods.BitmapProcess

_x0

protected readonly int _x0
Inclusive leftmost pixel index to be processed.
inherited fromBitmapExtensionMethods.BitmapProcess

_x1

protected readonly int _x1
Exclusive rightmost pixel index to be processed.
inherited fromBitmapExtensionMethods.BitmapProcess

_y0

protected readonly int _y0
Inclusive topmost pixel index to be processed.
inherited fromBitmapExtensionMethods.BitmapProcess

_y1

protected readonly int _y1
Exclusive bottommost pixel index to be processed.
inherited fromBitmapExtensionMethods.BitmapProcess

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.
inherited fromBitmapExtensionMethods.BitmapProcess

Process

#
protected override bool Process(int x, CancellationToken token)
Process a single iteration. This method should ideally not throw exceptions.
x (int)Data to process.
token (CancellationToken)Cancellation token.
Result.