The FI16RGB565 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)


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


For easy integration of the underlying structure into the .NET framework, the FI16RGB565 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 FI16RGB565 structure and my be used in all situations which require an FI16RGB565 type.


The following code example demonstrates the various conversions between the FI16RGB565 structure and the Color structure.
FI16RGB565 fi16rgb;
// Initialize the structure using a native .NET Color structure.
fi16rgb = new FI16RGB565(Color.Indigo);
// Initialize the structure using the implicit operator.
fi16rgb = Color.DarkSeaGreen;
// Convert the FI16RGB565 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


Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also