FreeImage.NET Class Library Reference
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
Name | Description | |
---|---|---|
FI16RGB565 |
Initializes a new instance based on the specified Color.
|
Properties
Name | Description | |
---|---|---|
Blue |
Gets or sets the blue color component.
| |
Color |
Gets or sets the Color of the structure.
| |
Green |
Gets or sets the green color component.
| |
Red |
Gets or sets the red color component.
|
Methods
Name | Description | |
---|---|---|
CompareTo(Object) |
Compares this instance with a specified Object.
| |
CompareTo(FI16RGB565) |
Compares this instance with a specified FI16RGB565 object.
| |
Equals(Object) |
Tests whether the specified object is a FI16RGB565 structure
and is equivalent to this FI16RGB565 structure.
(Overrides ValueTypeEquals(Object).) | |
Equals(FI16RGB565) |
Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure.
| |
GetHashCode |
Returns a hash code for this FI16RGB565 structure.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString |
Converts the numeric value of the FI16RGB565 object
to its equivalent string representation.
(Overrides ValueTypeToString.) |
Operators
Name | Description | |
---|---|---|
Equality |
Tests whether two specified FI16RGB565 structures are equivalent.
| |
(Color to FI16RGB565) |
Converts the value of a Color structure to a FI16RGB565 structure.
| |
(FI16RGB565 to Color) |
Converts the value of a FI16RGB565 structure to a Color structure.
| |
Inequality |
Tests whether two specified FI16RGB565 structures are different.
|
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