MaskIndex(Int32, Int32, Int32) Method

Definition

Assembly Broadside.dll

Returns the column (or row) of a mask that sample index of the base image falls on, by its centre.

public static int MaskIndex(int index, int size, int maskSize)

Parameters

index
Int32

The base image's column (or row).

size
Int32

The base image's width (or height).

maskSize
Int32

The mask's width (or height).

Returns

Int32
⌊(2 × index + 1) × maskSize / (2 × size)⌋, within the mask.

Remarks

ISO 32000-2 §8.9.6.3 and §11.6.5.2: a mask and its image both map onto the unit square, whatever their resolutions, so a mask is sampled at its own resolution when drawn rather than resampled when decoded.