C# Класс AdvancedLauncher.Tools.Imaging.Utilities

Utilities functions used by the TargaImage class.
Показать файл Открыть проект

Приватные методы

Метод Описание
GetBits ( byte b, int offset, int count ) : int

Gets an int value representing the subset of bits from a single Byte.

Given -> b = 00110101 A call to GetBits(b, 2, 4) GetBits looks at the following bits in the byte -> 00{1101}00 Returns 1101 as an int (13)

GetColorFrom2Bytes ( byte one, byte two ) : Color

Reads ARGB values from the 16 bits of two given Bytes in a 1555 format.

Gets the ARGB values from the 16 bits in the two bytes based on the below diagram | BYTE 1 | BYTE 2 | | A RRRRR GG | GGG BBBBB |

GetInt16BinaryString ( Int16 n ) : string

Gets a 16 character binary string of the specified Int16 value.

This method was used during debugging and is left here just for fun.

GetIntBinaryString ( Int32 n ) : string

Gets a 32 character binary string of the specified Int32 value.

This method was used during debugging and is left here just for fun.