C# 클래스 RemoteLedMatrix.Helpers.ColorExtensions

Class of extensions to make dealing with Colors easier
파일 보기 프로젝트 열기: ms-iot/LEDMatrix

공개 메소드들

메소드 설명
ApplyGamma ( this source, double gamma ) : Color

Gamma shifts a color by a given amount

FlipEvenColumns ( this pixels, int pixelsPerColumn ) : List

Flips alternating columns of colors in an image

Get21BitPixelBytes ( this colors ) : IEnumerable

Converts an IEnumerable of colors into an IEnumerable of bytes

GetHue ( this color ) : float

Gets the hue as a 0-360 value, representing the degree of rotation

GetIntensity ( this color ) : float

Gets the HSI intensity of the color

GetSaturation ( this color ) : float

Gets the HSI saturation of the color

To21BitPixelBytes ( this color ) : IEnumerable

Extension method for converting a color to three 7-bit bytes

ToColorList ( this bitmap ) : List

Gets a list of all the pixels in a bitmap, serialized to a flat list

ToPerceptual ( this source ) : Color

Shifts a color's intensity so that it looks perceptually correct when displayed on RGB leds.

비공개 메소드들

메소드 설명
ApplyGammaToChannel ( byte value, double gamma ) : byte

Applies a gamma shift to a byte value

PerceptualTransformA ( double hue, float saturation, float intensity ) : byte

Transform one of three for converting a HSI-based color to a perceptually adjusted RGB value

PerceptualTransformB ( double hue, float saturation, float intensity ) : byte

Transform two of three for converting a HSI-based color to a perceptually adjusted RGB value

PerceptualTransformC ( double hue, float saturation, float intensity ) : byte

Transform three of three for converting a HSI-based color to a perceptually adjusted RGB value

메소드 상세

ApplyGamma() 공개 정적인 메소드

Gamma shifts a color by a given amount
public static ApplyGamma ( this source, double gamma ) : Color
source this Source pixel to gamma shift
gamma double Amount to gamma shift by
리턴 Color

FlipEvenColumns() 공개 정적인 메소드

Flips alternating columns of colors in an image
public static FlipEvenColumns ( this pixels, int pixelsPerColumn ) : List
pixels this Color data to flip columns for
pixelsPerColumn int How many pixels are in each column
리턴 List

Get21BitPixelBytes() 공개 정적인 메소드

Converts an IEnumerable of colors into an IEnumerable of bytes
public static Get21BitPixelBytes ( this colors ) : IEnumerable
colors this List of colors to get bytes for
리턴 IEnumerable

GetHue() 공개 정적인 메소드

Gets the hue as a 0-360 value, representing the degree of rotation
public static GetHue ( this color ) : float
color this Color to get the hue of
리턴 float

GetIntensity() 공개 정적인 메소드

Gets the HSI intensity of the color
public static GetIntensity ( this color ) : float
color this Color to get the intensity of
리턴 float

GetSaturation() 공개 정적인 메소드

Gets the HSI saturation of the color
public static GetSaturation ( this color ) : float
color this Color to get the saturation of
리턴 float

To21BitPixelBytes() 공개 정적인 메소드

Extension method for converting a color to three 7-bit bytes
public static To21BitPixelBytes ( this color ) : IEnumerable
color this Color to convert to bytes
리턴 IEnumerable

ToColorList() 공개 정적인 메소드

Gets a list of all the pixels in a bitmap, serialized to a flat list
public static ToColorList ( this bitmap ) : List
bitmap this Bitmap to serialize into a list of colors
리턴 List

ToPerceptual() 공개 정적인 메소드

Shifts a color's intensity so that it looks perceptually correct when displayed on RGB leds.
public static ToPerceptual ( this source ) : Color
source this Unadjusted color to shift
리턴 Color