La32 Struct

A pixel with a 16-bit gray level and a 16-bit straight (non-premultiplied) alpha component, stored in native endianness.

public struct La32 : IEquatable<La32>

Remarks

It holds a 16-bit grayscale image with transparency in half the memory of Rgba64.

Implements

Constructors

NameDescription
La32(ushort, ushort)Initializes a new instance of the La32 struct.

La32(ushort, ushort)

La32.cs

Initializes a new instance of the La32 struct.

public La32(ushort l, ushort a = 65535)

Parameters

l ushort
The gray level.
a ushort
The straight alpha component. Defaults to fully opaque.

Methods

NameDescription
Equals(La32)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(La32)

La32.cs

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(La32 other)
Parameters
other La32
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

La32.cs

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

La32.cs

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

ToString()

La32.cs

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string The fully qualified type name.

Operators

NameDescription
operator ==(La32, La32)Compares two pixels for equality.
operator !=(La32, La32)Compares two pixels for inequality.

operator ==(La32, La32)

La32.cs

Compares two pixels for equality.

public static bool operator ==(La32 left, La32 right)

Parameters

left La32
The first pixel.
right La32
The second pixel.

Returns

bool true if all components are equal; otherwise false.

operator !=(La32, La32)

La32.cs

Compares two pixels for inequality.

public static bool operator !=(La32 left, La32 right)

Parameters

left La32
The first pixel.
right La32
The second pixel.

Returns

bool true if any component differs; otherwise false.

Fields

NameDescription
AThe straight alpha component (0 is fully transparent, 65535 is fully opaque).
LThe gray level (0 is black, 65535 is white), in the encoded (not linear) scale.

A

The straight alpha component (0 is fully transparent, 65535 is fully opaque).

public ushort A

L

The gray level (0 is black, 65535 is white), in the encoded (not linear) scale.

public ushort L