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 AField Value
B
The blue component.
public byte BField Value
Black
Black (0, 0, 0, 255) pixel.
public static readonly Bgra32 BlackField Value
G
The green component.
public byte GField Value
R
The red component.
public byte RField Value
White
White (255, 255, 255, 255) pixel.
public static readonly Bgra32 WhiteField Value
Methods
Equals(object?)
public override readonly bool Equals(object? obj)Parameters
obj object
?
Returns
Equals(Bgra32)
public readonly bool Equals(Bgra32 other)Parameters
other Bgra32
Returns
FromRgba32(Rgba32)
static Bgra32 FromRgba32(Rgba32 source)Parameters
source Rgba32
Returns
FromScaledVector4(Vector4)
static Bgra32 FromScaledVector4(Vector4 source)Parameters
source Vector4
Returns
FromUnscaledVector4(Vector4)
static Bgra32 FromUnscaledVector4(Vector4 source)Parameters
source Vector4
Returns
GetHashCode()
public override readonly int GetHashCode()Returns
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
ToString()
public override readonly string ToString()Returns
ToUnscaledVector4()
public readonly Vector4 ToUnscaledVector4()Returns
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
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
true if the left parameter is not equal to the right
parameter;
otherwise, false.
</t></bgra32></bgra32>