Struct TiffBitsPerSample
The number of bits per component.
Implements
Namespace: SixLabors.ImageSharp.Formats.Tiff
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct 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 = null)
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. |
Properties
| Improve this Doc View SourceChannel0
Gets the bits for the channel 0.
Declaration
public readonly ushort Channel0 { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Channel1
Gets the bits for the channel 1.
Declaration
public readonly ushort Channel1 { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Channel2
Gets the bits for the channel 2.
Declaration
public readonly ushort Channel2 { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Channel3
Gets the bits for the alpha channel.
Declaration
public readonly ushort Channel3 { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Channels
Gets the number of channels.
Declaration
public readonly byte Channels { get; }
Property 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(Nullable<Object>)
Declaration
public override readonly bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Object> | obj |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
ToArray()
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 |
TryParse(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. |
Operators
| Improve this Doc View SourceEquality(TiffBitsPerSample, TiffBitsPerSample)
Checks whether two TiffBitsPerSample structures are equal.
Declaration
public static bool operator ==(TiffBitsPerSample left, TiffBitsPerSample right)
Parameters
Type | Name | Description |
---|---|---|
TiffBitsPerSample | left | The left hand TiffBitsPerSample operand. |
TiffBitsPerSample | right | The right hand TiffBitsPerSample operand. |
Returns
Type | Description |
---|---|
Boolean | True if the |
Inequality(TiffBitsPerSample, TiffBitsPerSample)
Checks whether two TiffBitsPerSample structures are not equal.
Declaration
public static bool operator !=(TiffBitsPerSample left, TiffBitsPerSample right)
Parameters
Type | Name | Description |
---|---|---|
TiffBitsPerSample | left | The left hand TiffBitsPerSample operand. |
TiffBitsPerSample | right | The right hand TiffBitsPerSample operand. |
Returns
Type | Description |
---|---|
Boolean | True if the |