The FI16RGB555 structure describes a color consisting of relative intensities of red, green, blue and alpha value. Each single color component consumes 5 bits and so, takes values in the range from 0 to 31.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
[SerializableAttribute]
public struct FI16RGB555 : IComparable, 
	IComparable<FI16RGB555>, IEquatable<FI16RGB555>
Visual Basic (Declaration)
<SerializableAttribute> _
Public Structure FI16RGB555 _
	Implements IComparable, IComparable(Of FI16RGB555),  _
	IEquatable(Of FI16RGB555)
Visual C++
[SerializableAttribute]
public value class FI16RGB555 : IComparable, 
	IComparable<FI16RGB555>, IEquatable<FI16RGB555>

Remarks

For easy integration of the underlying structure into the .NET framework, the FI16RGB555 structure implements implicit conversion operators to convert the represented color to and from the Color type. This makes the Color type a real replacement for the FI16RGB555 structure and my be used in all situations which require an FI16RGB555 type.

Examples

The following code example demonstrates the various conversions between the FI16RGB555 structure and the Color structure.
CopyC#
FI16RGB555 fi16rgb;
// Initialize the structure using a native .NET Color structure.
fi16rgb = new FI16RGB555(Color.Indigo);
// Initialize the structure using the implicit operator.
fi16rgb = Color.DarkSeaGreen;
// Convert the FI16RGB555 instance into a native .NET Color
// using its implicit operator.
Color color = fi16rgb;
// Using the structure's Color property for converting it
// into a native .NET Color.
Color another = fi16rgb.Color;

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also