Describes the layout of the samples of a raw pixel.
struct
|
SampleLayout
|
implements
|
IEquatable<SampleLayout>
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<SampleLayout>
|
||
value
|
|
The configurator object. |
The configurator object for SampleType.
public
static
readonly
field
|
ConfigSampleType
|
||
type
|
IConfigurator<SampleType>
|
public
property
|
BitDepth
{
get
}
|
||
type
|
int32
|
||
value
|
Byte order of multibyte sample value.
public
readonly
field
|
Endianess
|
||
type
|
ByteOrder
|
32-bit big-endian floating point value.
public
static
readonly
field
|
Float32BE
|
||
type
|
SampleLayout
|
32-bit little-endian floating point value.
public
static
readonly
field
|
Float32LE
|
||
type
|
SampleLayout
|
Signed 16-bit big-endian integer.
public
static
readonly
field
|
Int16BE
|
||
type
|
SampleLayout
|
Signed 16-bit little-endian integer.
public
static
readonly
field
|
Int16LE
|
||
type
|
SampleLayout
|
Signed 8-bit integer.
public
static
readonly
field
|
Int8
|
||
type
|
SampleLayout
|
public
property
|
IsFloat
{
get
}
|
||
type
|
bool
|
||
value
|
public
property
|
IsInteger
{
get
}
|
||
type
|
bool
|
||
value
|
public
property
|
IsSigned
{
get
}
|
||
type
|
bool
|
||
value
|
public
property
|
IsUnsigned
{
get
}
|
||
type
|
bool
|
||
value
|
Is this raw sample layout valid?
public
property
|
IsValid
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
layout
is
valid,
false
if
not. |
Returns the image pixel format for this raw sample layout.
public
property
|
PixelFormat
{
get
}
|
||
type
|
PixelFormat
|
||
value
|
The image pixel format. |
Zero-based index of sample that maps to the alpha channel.
public
readonly
field
|
SampleAlpha
|
||
type
|
int32
|
Remarks:
If
-1
,
no
value
is
output
to
the
alpha
channel.
Zero-based index of sample that maps to the blue channel.
public
readonly
field
|
SampleBlue
|
||
type
|
int32
|
Remarks:
If
-1
,
no
value
is
output
to
the
blue
channel.
Number of raw samples per pixel.
public
readonly
field
|
SampleCount
|
||
type
|
int32
|
Zero-based index of sample that maps to the green channel.
public
readonly
field
|
SampleGreen
|
||
type
|
int32
|
Remarks:
If
-1
,
no
value
is
output
to
the
green
channel.
Zero-based index of sample that maps to the red channel.
public
readonly
field
|
SampleRed
|
||
type
|
int32
|
Remarks:
If
-1
,
no
value
is
output
to
the
red
channel.
The sample data type.
public
readonly
field
|
Type
|
||
type
|
SampleType
|
Unsigned 16-bit big-endian integer.
public
static
readonly
field
|
UInt16BE
|
||
type
|
SampleLayout
|
Unsigned 16-bit little-endian integer.
public
static
readonly
field
|
UInt16LE
|
||
type
|
SampleLayout
|
Unsigned 8-bit integer.
public
static
readonly
field
|
UInt8
|
||
type
|
SampleLayout
|
public
static
readonly
field
|
Unknown
|
||
type
|
SampleLayout
|
public
method
|
Equals
(SampleLayout other)
|
||
type
|
bool
|
||
params
|
other
|
Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).
[Pure]
|
||||
public
method
|
Grayscale
(int32 sampleCount = 1,
int32 sampleIntensity = 0,
int32 sampleAlpha = -1)
|
|||
type
|
SampleLayout
|
|||
params
|
sampleCount
|
[>0]
|
Number
of
raw
sample
values
per
pixel.
Defaults
to
1 .
|
|
sampleIntensity
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
grayscale
intensity
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
0 .
|
||
sampleAlpha
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
alpha
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
-1 .
|
||
returns
|
The resulting sample layout. |
Checks if the given raw sample layout has the same binary format as this one.
public
method
|
SameBinaryType
(SampleLayout other)
|
||
type
|
bool
|
||
params
|
other
|
The other layout. | |
returns
|
true
if
both
layouts
have
the
same
binary
format,
false
if
not.
|
Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).
public
method
|
Truecolor
(int32 sampleCount = 3,
int32 sampleRed = 0,
int32 sampleGreen = 1,
int32 sampleBlue = 2,
int32 sampleAlpha = -1)
|
||
type
|
SampleLayout
|
||
params
|
sampleCount
|
[>0]
|
Number
of
raw
sample
values
per
pixel.
Defaults
to
3 .
|
sampleRed
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
red
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
0 .
|
|
sampleGreen
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
green
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
1 .
|
|
sampleBlue
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
blue
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
2 .
|
|
sampleAlpha
|
[-1..sampleCount-1]
|
Index
of
raw
sample
value
that
maps
to
the
alpha
channel
or
-1
if
no
mapping
shall
be
done.
Defaults
to
-1 .
|
|
returns
|
The resulting sample layout. |