SampleLayout

Description

struct Tinman.Terrain.Imaging.SampleLayout

Describes the layout of the samples of a raw pixel.

Public / Constants

Float32​BE


public static readonly attribute Float32BE → (SampleLayout)

32-bit big-endian floating point value.

Float32​LE


public static readonly attribute Float32LE → (SampleLayout)

32-bit little-endian floating point value.

Int16​BE


public static readonly attribute Int16BE → (SampleLayout)

Signed 16-bit big-endian integer.

Int16​LE


public static readonly attribute Int16LE → (SampleLayout)

Signed 16-bit little-endian integer.

Int8


public static readonly attribute Int8 → (SampleLayout)

Signed 8-bit integer.

UInt16​BE


public static readonly attribute UInt16BE → (SampleLayout)

Unsigned 16-bit big-endian integer.

UInt16​LE


public static readonly attribute UInt16LE → (SampleLayout)

Unsigned 16-bit little-endian integer.

UInt8


public static readonly attribute UInt8 → (SampleLayout)

Unsigned 8-bit integer.

Unknown


public static readonly attribute Unknown → (SampleLayout)

Unknown resp. undefined sample layout.

Public / Methods

Grayscale


[Pure]
public method Grayscale → (3)

sampleCount opt : int32 = 1

[>0]
Number of raw sample values per pixel.

sampleIntensity opt : int32 = 0

[-1..sampleCount-1]
Index of raw sample value that maps to the grayscale intensity channel or -1 if no mapping shall be done.

sampleAlpha opt : int32 = -1

[-1..sampleCount-1]
Index of raw sample value that maps to the alpha channel or -1 if no mapping shall be done.

returns → SampleLayout

The resulting sample layout.

Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).

Same​Binary​Type


public method SameBinaryType → (1)

other in : SampleLayout

The other layout.

returns → bool

true if both layouts have the same binary format, false if not.

Checks if the given raw sample layout has the same binary format as this one.

Truecolor


public method Truecolor → (5)

sampleCount opt : int32 = 3

[>0]
Number of raw sample values per pixel.

sampleRed opt : int32 = 0

[-1..sampleCount-1]
Index of raw sample value that maps to the red channel or -1 if no mapping shall be done.

sampleGreen opt : int32 = 1

[-1..sampleCount-1]
Index of raw sample value that maps to the green channel or -1 if no mapping shall be done.

sampleBlue opt : int32 = 2

[-1..sampleCount-1]
Index of raw sample value that maps to the blue channel or -1 if no mapping shall be done.

sampleAlpha opt : int32 = -1

[-1..sampleCount-1]
Index of raw sample value that maps to the alpha channel or -1 if no mapping shall be done.

returns → SampleLayout

The resulting sample layout.

Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).

Public / Attributes

Bit​Depth


public attribute BitDepth → (get)

value : int32

The sample bit-depth: 8, 16 or 32.

Returns the bit-depth of the sample layout.

Endianness


public readonly attribute Endianness → (ByteOrder)

Byte order of multibyte sample value.

Is​Float


public attribute IsFloat → (get)

value : bool

true if the sample type is SampleType.Float32,
false if not.

Is this a floating-point sample layout?

Is​Integer


public attribute IsInteger → (get)

value : bool

true if the sample type is not SampleType.Float32,
false if it is.

Is this an integer sample layout?

Is​Signed


public attribute IsSigned → (get)

value : bool

true if this sample layout allows negative sample values,
false if this sample layout does not allow negative sample values.

Is this sample layout signed?

Is​Unsigned


public attribute IsUnsigned → (get)

value : bool

true if this sample layout does not allow negative sample values,
false if this sample layout allows negative sample values.

Is this sample layout unsigned?

Is​Valid


public attribute IsValid → (get)

value : bool

true if the layout is valid, false if not.

Is this raw sample layout valid?

Pixel​Format


public attribute PixelFormat → (get)

value : PixelFormat

The image pixel format.

Returns the image pixel format for this raw sample layout.

Sample​Alpha


public readonly attribute SampleAlpha → (int32)

Zero-based index of sample that maps to the alpha channel.

If -1, no value is output to the alpha channel.

Sample​Blue


public readonly attribute SampleBlue → (int32)

Zero-based index of sample that maps to the blue channel.

If -1, no value is output to the blue channel.

Sample​Count


public readonly attribute SampleCount → (int32)

Number of raw samples per pixel.

Sample​Green


public readonly attribute SampleGreen → (int32)

Zero-based index of sample that maps to the green channel.

If -1, no value is output to the green channel.

Sample​Red


public readonly attribute SampleRed → (int32)

Zero-based index of sample that maps to the red channel.

If -1, no value is output to the red channel.

Type


public readonly attribute Type → (SampleType)

The sample data type.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<SampleLayout>

[not-null]
The configurator object.

The configurator object for this type.

Config​Sample​Type


public static attribute ConfigSampleType → (get)

value : IConfigurator<SampleType>

[not-null]
The configurator object.

The configurator object for SampleType.