Struct Bgra32

Struct Bgra32

Namespace: Aspose.Medical.Imaging.PixelFormats
Assembly: Aspose.Medical.dll (25.11.0)

Packed pixel: contains four 8-bit unsigned normalized values [0..255]. The components are stored in Blue, Green, Red, and Alpha order (least significant to most significant byte). NOTE: the structure is mutable.

public struct Bgra32 : IPixel<bgra32>, IEquatable<bgra32>

Implements

IPixel<bgra32> , IEquatable<bgra32>

Inherited Members

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

Bgra32(byte, byte, byte, byte)

Initializes a new instance of the Aspose.Medical.Imaging.PixelFormats.Bgra32 struct.

public Bgra32(byte r, byte g, byte b, byte a)

Parameters

r byte

The red component.

g byte

The green component.

b byte

The blue component.

a byte

The alpha component.

Bgra32(byte, byte, byte)

Initializes a new instance of the Aspose.Medical.Imaging.PixelFormats.Bgra32 struct.

public Bgra32(byte r, byte g, byte b)

Parameters

r byte

The red component.

g byte

The green component.

b byte

The blue component.

Fields

A

The alpha component.

public byte A

Field Value

byte

B

The blue component.

public byte B

Field Value

byte

Black

Black (0, 0, 0, 255) pixel.

public static readonly Bgra32 Black

Field Value

Bgra32

G

The green component.

public byte G

Field Value

byte

R

The red component.

public byte R

Field Value

byte

White

White (255, 255, 255, 255) pixel.

public static readonly Bgra32 White

Field Value

Bgra32

Methods

Equals(object?)

public override readonly bool Equals(object? obj)

Parameters

obj object ?

Returns

bool

Equals(Bgra32)

public readonly bool Equals(Bgra32 other)

Parameters

other Bgra32

Returns

bool

FromRgba32(Rgba32)

static Bgra32 FromRgba32(Rgba32 source)

Parameters

source Rgba32

Returns

Bgra32

FromScaledVector4(Vector4)

static Bgra32 FromScaledVector4(Vector4 source)

Parameters

source Vector4

Returns

Bgra32

FromUnscaledVector4(Vector4)

static Bgra32 FromUnscaledVector4(Vector4 source)

Parameters

source Vector4

Returns

Bgra32

GetHashCode()

public override readonly int GetHashCode()

Returns

int

Pack<t>(T)

Packs the given numeric pixel value into Aspose.Medical.Imaging.PixelFormats.Bgra32 pixel.

public void Pack<t>(T value) where T : unmanaged, IBinaryInteger<t>, IBinaryInteger<t>

Parameters

value T

A numeric pixel value to be packed.

Type Parameters

T

Numeric representation of a pixel value.

ToScaledVector4()

public readonly Vector4 ToScaledVector4()

Returns

Vector4

ToString()

public override readonly string ToString()

Returns

string

ToUnscaledVector4()

public readonly Vector4 ToUnscaledVector4()

Returns

Vector4

Operators

operator ==(Bgra32, Bgra32)

Compares two Aspose.Medical.Imaging.PixelFormats.Bgra32 objects for equality.

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

Parameters

left Bgra32

The Aspose.Medical.Imaging.PixelFormats.Bgra32 on the left side of the operand.

right Bgra32

The Aspose.Medical.Imaging.PixelFormats.Bgra32 on the right side of the operand.

Returns

bool

true if the left parameter is equal to the right parameter; otherwise, false.

operator !=(Bgra32, Bgra32)

Compares two Aspose.Medical.Imaging.PixelFormats.Bgra32 objects for equality.

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

Parameters

left Bgra32

The Aspose.Medical.Imaging.PixelFormats.Bgra32 on the left side of the operand.

right Bgra32

The Aspose.Medical.Imaging.PixelFormats.Bgra32 on the right side of the operand.

Returns

bool

true if the left parameter is not equal to the right parameter; otherwise, false. </t></bgra32></bgra32>