Struct TiffBitsPerSample
The number of bits per component.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Tiff
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct TiffBitsPerSample : IEquatable<TiffBitsPerSample>
Constructors
| Improve this Doc View SourceTiffBitsPerSample(UInt16, UInt16, UInt16, UInt16)
Initializes a new instance of the TiffBitsPerSample struct.
Declaration
public TiffBitsPerSample(ushort channel0, ushort channel1, ushort channel2, ushort channel3 = 0)
Parameters
Type | Name | Description |
---|---|---|
UInt16 | channel0 | The bits for the channel 0. |
UInt16 | channel1 | The bits for the channel 1. |
UInt16 | channel2 | The bits for the channel 2. |
UInt16 | channel3 | The bits for the channel 3. |
Fields
| Improve this Doc View SourceChannel0
The bits for the channel 0.
Declaration
public readonly ushort Channel0
Field Value
Type | Description |
---|---|
UInt16 |
Channel1
The bits for the channel 1.
Declaration
public readonly ushort Channel1
Field Value
Type | Description |
---|---|
UInt16 |
Channel2
The bits for the channel 2.
Declaration
public readonly ushort Channel2
Field Value
Type | Description |
---|---|
UInt16 |
Channel3
The bits for the alpha channel.
Declaration
public readonly ushort Channel3
Field Value
Type | Description |
---|---|
UInt16 |
Channels
The number of channels.
Declaration
public readonly byte Channels
Field Value
Type | Description |
---|---|
Byte |
Methods
| Improve this Doc View SourceBitsPerPixel()
Gets the bits per pixel for the given bits per sample.
Declaration
public readonly TiffBitsPerPixel BitsPerPixel()
Returns
Type | Description |
---|---|
TiffBitsPerPixel | Bits per pixel. |
Equals(TiffBitsPerSample)
Declaration
public readonly bool Equals(TiffBitsPerSample other)
Parameters
Type | Name | Description |
---|---|---|
TiffBitsPerSample | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToArray()
Converts the bits per sample struct to an ushort array.
Declaration
public readonly ushort[] ToArray()
Returns
Type | Description |
---|---|
UInt16[] | Bits per sample as ushort array. |
ToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceTryParse(UInt16[], out TiffBitsPerSample)
Tries to parse a ushort array and convert it into a TiffBitsPerSample struct.
Declaration
public static bool TryParse(ushort[] value, out TiffBitsPerSample sample)
Parameters
Type | Name | Description |
---|---|---|
UInt16[] | value | The value to parse. |
TiffBitsPerSample | sample | The tiff bits per sample. |
Returns
Type | Description |
---|---|
Boolean | True, if the value could be parsed. |