FI16RGB565 Structure

FreeImage.NET

FI16RGB565 Structure
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) Version: 3.17.0.4 (3.17.0)
Syntax
C#
[SerializableAttribute]
public struct FI16RGB565 : IComparable, 
	IComparable<FI16RGB565>, IEquatable<FI16RGB565>

The FI16RGB565 type exposes the following members.

Constructors
  NameDescription
Public methodFI16RGB565
Initializes a new instance based on the specified Color.
Top
Properties
  NameDescription
Public propertyBlue
Gets or sets the blue color component.
Public propertyColor
Gets or sets the Color of the structure.
Public propertyGreen
Gets or sets the green color component.
Public propertyRed
Gets or sets the red color component.
Top
Methods
  NameDescription
Public methodCompareTo(Object)
Compares this instance with a specified Object.
Public methodCompareTo(FI16RGB565)
Compares this instance with a specified FI16RGB565 object.
Public methodEquals(Object)
Tests whether the specified object is a FI16RGB565 structure and is equivalent to this FI16RGB565 structure.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(FI16RGB565)
Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure.
Public methodGetHashCode
Returns a hash code for this FI16RGB565 structure.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Converts the numeric value of the FI16RGB565 object to its equivalent string representation.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Tests whether two specified FI16RGB565 structures are equivalent.
Public operatorStatic member(Color to FI16RGB565)
Converts the value of a Color structure to a FI16RGB565 structure.
Public operatorStatic member(FI16RGB565 to Color)
Converts the value of a FI16RGB565 structure to a Color structure.
Public operatorStatic memberInequality
Tests whether two specified FI16RGB565 structures are different.
Top
Remarks

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.

Examples
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;
See Also